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: 154335 Delivered-To: patch@linaro.org Received: by 2002:a2e:299d:0:0:0:0:0 with SMTP id p29-v6csp6237833ljp; Thu, 20 Dec 2018 06:16:34 -0800 (PST) X-Google-Smtp-Source: AFSGD/WWE3K81dxLP8KcBhtLCPW12oeFv7tHRNtyjxh7gUIOtIlQul0P3tIQIFWD5bql1bbuhGE7 X-Received: by 2002:a63:f901:: with SMTP id h1mr23226328pgi.154.1545315394789; Thu, 20 Dec 2018 06:16:34 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1545315394; cv=none; d=google.com; s=arc-20160816; b=T+2uiyUWepWCJIWFynkYpAgikwp+oEhWpW/j8i9TQdbt244xq9k7KvpNTpy8yyANQ3 3Qoj98F6XbcPBvOblCmlZHOfaeuVymWRzHGJzzAWkF2BomKr8MLmvIfD72NO8qWNfTMI TzFj3MFlYGzWjumE1zolh/PCkS1GLaoglGsUB078eMOYPrPMX7pibATYHYP7GLn99n0S VFoch4PyTYM/KktVR9R6iPOR+7IoUzrKQoVE36dBc6bkYXfEncJsF3tCXuEkUEBPlcx5 gfCpdjGG3GhYYzRZ8vUhyapH7DT8NNWBbJsvvHLP6iih6uhVhjgf3x9/elG5x5rXjFap siAg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version:cc :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:message-id:date:subject:to:from:delivered-to; bh=NMpl5yDPF7LsFJa2nQsYjXPv+/oFoWJ1aM73Y88Y9LY=; b=kJlUbDMWf+nfZwILk0WzgXVEEOogmXjLMD2eRvCyi+Sh1stdeXLExeScWslXeVbibq /Xxq28ayOj7OIngAd41JcPE5K3YJBkbtmeLHjuwyXHwXSCluVGuOJ4dKwv/he4kTdcIB gOcr41KqZVVB7ujnwFrJ3WQZ8MJzAqQxuwA6OT9roETJr/7sYJwbPOFwMvrwRHuXcomM MfAbcbLQai3igqsmAs9OFdeX86sQaRps1F+F98WhQJ8fJ4TaBpSdjAoJC/a2Gr+kSN5A 85QQGBx7vjF+nKvmxHgL/tlBuQ1S+DtCL3BY5IMVayRqX8vakWImmlm5Gf15XQ4I22ZM 45pA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 as permitted sender) smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from gabe.freedesktop.org (gabe.freedesktop.org. [131.252.210.177]) by mx.google.com with ESMTPS id f65si628806pfb.194.2018.12.20.06.16.34 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 20 Dec 2018 06:16:34 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 as permitted sender) client-ip=131.252.210.177; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 as permitted sender) smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id B52396F3BD; Thu, 20 Dec 2018 14:16:32 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-wm1-x342.google.com (mail-wm1-x342.google.com [IPv6:2a00:1450:4864:20::342]) by gabe.freedesktop.org (Postfix) with ESMTPS id 651C66F3C1 for ; Thu, 20 Dec 2018 14:16:31 +0000 (UTC) Received: by mail-wm1-x342.google.com with SMTP id y185so12044883wmd.1 for ; Thu, 20 Dec 2018 06:16:31 -0800 (PST) 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=fk4waP9VBkh/gbL+lNSxudUo2CAricgNw53xeO+qRw0jIugsk5Z2he+A2MRjAlMnQn tMnPZ51NqmQj5bVwILgsW4/zrPlLt6iqWVZ2JxvailKS34tmqNKfW5YSrbsaRlAL/8tj 2E/bJ7IItl7MBFKzy9mTV4ovFSXMml9n6+5ireANWSzezWgj57X5WNVhjQZ4eWptZBA1 wQTyoTY/11BFRmfOLNwE1Z7RHM2qanJauZcqcawnMn5bHZhuBqItGkftWzABmNE7ghHp +qWhxxzgoDS3lb75jntuKLWUhmFTzk9cgsESr36vQvwGgRxBi8XfeJ9DwQgk3T/xjLZK CkzA== X-Gm-Message-State: AA+aEWaX/FDQr7G6RkLvEvmIuYAlCOXTsHmpn9Yb2QyBPdJy/1mMglVI cwoFhULFWHkKAKoYTSJmvWyZKQ== 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 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 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: ulf.hansson@linaro.org, Vincent Guittot MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" 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(-)