From patchwork Wed Jan 23 07:50:12 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vincent Guittot X-Patchwork-Id: 10776703 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id ECC9E14E5 for ; Wed, 23 Jan 2019 07:50:24 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id DF5E82B576 for ; Wed, 23 Jan 2019 07:50:24 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D32462B57E; Wed, 23 Jan 2019 07:50:24 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 78B532B578 for ; Wed, 23 Jan 2019 07:50:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727001AbfAWHuX (ORCPT ); Wed, 23 Jan 2019 02:50:23 -0500 Received: from mail-wr1-f65.google.com ([209.85.221.65]:33339 "EHLO mail-wr1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726168AbfAWHuW (ORCPT ); Wed, 23 Jan 2019 02:50:22 -0500 Received: by mail-wr1-f65.google.com with SMTP id p7so1233657wru.0 for ; Tue, 22 Jan 2019 23:50:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=ErITnZX7V2KHQl6xx/ncGHB7pc8CDMknHP/nniLmEZs=; b=HeoATH3X2Ycp16lTuJr3RNP5usYadU7AnoFwDbNRyOKZn/IcA2ni1PV2CGGgosiB8N HVRGbIPQlZMh86aFd6EqXDD/0Na+czVJa4J6obEEqxxZKj/kbSNMCWA9YAxm0B9rpOXW RD1Ej+Rvrj+NAAI0u8mAO7uebn1xvqjw5BWMg= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=ErITnZX7V2KHQl6xx/ncGHB7pc8CDMknHP/nniLmEZs=; b=ftYT83gJaB20VKWkZSAr+iWFQlzWhKv3k486PtKzUQUhi8aoX3SvlxTlc1q9Jk6tvj ju8GPPaLFt5QYR7310K6UxYmXdtUFCYYNtkOVpceD4aIeraW4JiNa2ViwzS8EuIroNhr EStnIEK7hl7/EgmNp5sP9P6X9kGtRYKoIzxbp0PSOmahRh7sPDpLJByR2DLfPgUI0XV3 C8vBV1j5MAytsvxg6nSOABe4okTSdlQGJmyKKUNV6Kez7J+DTaMeG21xMMt4c+O2V6iU kmP1oEYbirtgrDZCVzhnFw3qMEN3ofcDM6e0lpeyXd/3e/GOdLlt3kMRcPQ4SsFunqya eBTA== X-Gm-Message-State: AJcUukc4C76a44BdBrKBzbgP6DD+NwmgodnVhUHpgZ26N66yaobe1PRH WQvPpRgWZUdbTGxHMsI7TFaUaD4coSbeOg== X-Google-Smtp-Source: ALg8bN64TLsEtqUWmhPghRGCGHthC/cPxwQV/+PotTYAbILJ3Xs7xSV7CB8uD9ht0J0uipkuxPFCNQ== X-Received: by 2002:adf:ea11:: with SMTP id q17mr1325784wrm.328.1548229818594; Tue, 22 Jan 2019 23:50:18 -0800 (PST) Received: from localhost.localdomain ([2a01:e0a:f:6020:5ca6:2921:648b:56b6]) by smtp.gmail.com with ESMTPSA id i186sm70138787wmd.19.2019.01.22.23.50.17 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 22 Jan 2019 23:50:17 -0800 (PST) From: Vincent Guittot To: linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, rjw@rjwysocki.net, thara.gopinath@linaro.org, linux@roeck-us.net Cc: ulf.hansson@linaro.org, Vincent Guittot Subject: [PATCH v7 0/3] Move pm_runtime accounted time to raw nsec Date: Wed, 23 Jan 2019 08:50:12 +0100 Message-Id: <1548229814-24913-1-git-send-email-vincent.guittot@linaro.org> X-Mailer: git-send-email 2.7.4 Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Move pm_runtime accounted time to raw nsec. The subject of the patchset has changed as 1st patch o the previous versions has been queued by Rafael. Patch 1 set accounting_timestamp to 0 in pm_runtime_init and update it when enable. So we remove ordering constraint between timekeeping_init and pm_runtime_init Patch 2 moves time accounting on raw ns. This patch initially used ktime instead of raw ns but it was easier to move i915 driver on raw ns than on ktime. Change since v6: - move code that set accounting_timestamp in pm_runtime_enable Changes since v5: - removed patches already queued. - set accounting_timestamp to 0 in pm_runtime_init and update it when enable Changes since v4: -Update commit message Changes since v3: - Rebase on v4.20-rc7 without patch that has been queued by Rafael - Simplify the new interface pm_runtime_suspended_time() Changes since v2: - remove patch1 that has been queued by rafael - add new interface in pm_runtime to get accounted time - reorder patchset to prevent compilation error Changes since v1: - updated commit message of patch 1 - Added patches 2 & 3 to move runtime_pm accounting on raw ns Thara Gopinath (1): PM-runtime: Replace jiffies based accounting with ktime-based accounting Vincent Guittot (1): PM-runtime: update accounting_timestamp only when enable drivers/base/power/runtime.c | 26 ++++++++++++++++---------- drivers/base/power/sysfs.c | 11 ++++++++--- include/linux/pm.h | 6 +++--- 3 files changed, 27 insertions(+), 16 deletions(-) Reviewed-by: Ulf Hansson