From patchwork Thu Dec 20 14:16:22 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vincent Guittot X-Patchwork-Id: 10738955 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 F24CD13AD for ; Thu, 20 Dec 2018 14:16:47 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id DF9F02881C for ; Thu, 20 Dec 2018 14:16:47 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D373E28834; Thu, 20 Dec 2018 14:16:47 +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 886752881C for ; Thu, 20 Dec 2018 14:16:47 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731305AbeLTOQq (ORCPT ); Thu, 20 Dec 2018 09:16:46 -0500 Received: from mail-wm1-f68.google.com ([209.85.128.68]:33439 "EHLO mail-wm1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1733182AbeLTOQc (ORCPT ); Thu, 20 Dec 2018 09:16:32 -0500 Received: by mail-wm1-f68.google.com with SMTP id r24so12048713wmh.0 for ; Thu, 20 Dec 2018 06:16:31 -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=JyM8PoVpMMGReUNRG91nRP8Gc1/7Isx2yVO4mPm6EoM=; b=WUPcKtiXUBqRPZGNnMpt6uj94YSfAxMlbV23B9AFcwn3f4Vfeq6zQtK0rfRTyAUqd+ AaFoJ0jJHld2Yw9uxwERfC0ITkd8CJa63ZA60wmMGKEyaEHBmRuFNKjVuAtVjPKeA26u tUAplKXsg8czSznAmGn5387S1F3/Hy6HFD4go= 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=JyM8PoVpMMGReUNRG91nRP8Gc1/7Isx2yVO4mPm6EoM=; b=DrlRLSKAjft0DM6jJgs9Rzb2iox5J4C3aNk/ubaTI8RMiJTRQKd8YPGI8py5BvL1p1 z8HV+5k6El3WoclgHIsx3ok7JFbacTxy8g+ld8uMEcUu2nH/zwk845EX+eELZ+YAAtvK 0RM/CKYWShz89UecHvn9eRogJXS7ZKCkKqLVCaegZr9xfM0teaGKGNiRuVuA6MmJN70A j+LcCSUS6tnTfPVnBGZszQrlXrewH18ef8H66OlSe7mPi6Fg/4WB7jqpq+sRfkg4UQUo hVVX1mZQe49eDix9IBEViQqhggrIa/G7JY74bK12ahW2UUrQMQdmg3zaGmWflDpSoMTX 6Q3A== X-Gm-Message-State: AA+aEWYcbZKiTVVRGBXom8gbFvAKAliREaaTPYhs0ownkyIsTdHkjrxD L4z5POs7FkEuKJyEKY7lw0lwoRarl1tPdg== X-Google-Smtp-Source: AFSGD/Vpk1ALyVefYKtwRXYnZPYD2jYShLTm84caBmf/krEfUQ2IRPsXwDJIcSyluoXXUuaZ/utYdA== X-Received: by 2002:a1c:b687:: with SMTP id g129mr11493682wmf.59.1545315389791; Thu, 20 Dec 2018 06:16:29 -0800 (PST) Received: from localhost.localdomain ([2a01:e0a:f:6020:f9b3:37c1:b11a:64ce]) by smtp.gmail.com with ESMTPSA id 127sm2313218wmm.45.2018.12.20.06.16.28 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 20 Dec 2018 06:16:29 -0800 (PST) From: Vincent Guittot To: linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, rjw@rjwysocki.net, thara.gopinath@linaro.org, jani.nikula@linux.intel.com, joonas.lahtinen@linux.intel.com, rodrigo.vivi@intel.com, airlied@linux.ie, intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org Cc: ulf.hansson@linaro.org, Vincent Guittot Subject: [PATCH v4 0/3] Move pm_runtime accounted time to raw nsec Date: Thu, 20 Dec 2018 15:16:22 +0100 Message-Id: <1545315385-14384-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 the 1st patch of the previous version has been queued by Rafael. Patch 1 adds a new pm_runtime interface to get accounted suspended time Patch 2 moves drm/i915 driver on the new interface and removes access to internal fields. Patch 3 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. 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 (2): PM/runtime: Add a new interface to get accounted time drm/i915: Move on the new pm runtime interface drivers/base/power/runtime.c | 27 ++++++++++++++++++++++----- drivers/base/power/sysfs.c | 11 ++++++++--- drivers/gpu/drm/i915/i915_pmu.c | 16 ++++++---------- drivers/gpu/drm/i915/i915_pmu.h | 4 ++-- include/linux/pm.h | 6 +++--- include/linux/pm_runtime.h | 2 ++ 6 files changed, 43 insertions(+), 23 deletions(-)