From patchwork Thu Sep 1 03:50:47 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alex Shi X-Patchwork-Id: 75159 Delivered-To: patch@linaro.org Received: by 10.140.29.8 with SMTP id a8csp72613qga; Wed, 31 Aug 2016 20:50:54 -0700 (PDT) X-Received: by 10.98.149.131 with SMTP id c3mr23406642pfk.73.1472701854099; Wed, 31 Aug 2016 20:50:54 -0700 (PDT) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k20si3249407pfg.177.2016.08.31.20.50.53; Wed, 31 Aug 2016 20:50:54 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-pm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org; spf=pass (google.com: best guess record for domain of linux-pm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-pm-owner@vger.kernel.org; dmarc=fail (p=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754950AbcIADuw (ORCPT + 14 others); Wed, 31 Aug 2016 23:50:52 -0400 Received: from mail-pa0-f50.google.com ([209.85.220.50]:33494 "EHLO mail-pa0-f50.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754737AbcIADuv (ORCPT ); Wed, 31 Aug 2016 23:50:51 -0400 Received: by mail-pa0-f50.google.com with SMTP id cy9so25170570pac.0 for ; Wed, 31 Aug 2016 20:50:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=subject:to:references:cc:from:message-id:date:user-agent :mime-version:in-reply-to:content-transfer-encoding; bh=VYY5qKb/4cvAJZPI5YJcxP4JOgtA48GSa6D8twyIFpY=; b=O8u6GnE88JjTZcihYyRGLk0C5Cpu8EzGPUipGthi3ktZnEJIdUnk7h9HEnv0ajVeLM 3j1QgERTUhI5zPq97ropVmLPlP6U0TNDHdc7BBJcAT+U63Z425MCpzAB0/fYgUolZIF0 DVJdEEGt886xf/NuyU74QOLQWsFiM++fR0PS8= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:subject:to:references:cc:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding; bh=VYY5qKb/4cvAJZPI5YJcxP4JOgtA48GSa6D8twyIFpY=; b=FjnbEbtelMQKmUtYPBGpyV9kyBv7y3HBIv+2Ffxawr0fXgftToir2FRfrhfjivHz3x 4WjguW6/7ZKjK1yreGBaE+Gc1SSCPRjbu35K/tDjMwThiGY7YkOR+q8Rnpfny+7MIj3A BJvXb+YbcGqcIoawNspkXDBkkMvJntVP2eB/wSHnrhWKCJHSPyRyZIXA2QwFsyR6lOe+ gebHZ7EwFEsFCpD8IYFuDACnbxD81QMYoSTUDjePDEYvVkIDDmNqZWIuyBPie1Z5xemo WLPolEOknUiYMSNCqGS0DE3agb/bylpSrpV/QKrNq1QAiWREvq4OEW+Lxls9/myS8uTx O0Nw== X-Gm-Message-State: AE9vXwN1nF2APazGqXASEZdg0slJqbh0Gy2L0i7Bd63svz/KeHCzb2FrIrfTqaOezsWUCEaa X-Received: by 10.66.127.10 with SMTP id nc10mr22891592pab.109.1472701851117; Wed, 31 Aug 2016 20:50:51 -0700 (PDT) Received: from [192.168.0.100] ([139.59.249.186]) by smtp.googlemail.com with ESMTPSA id y2sm2930309pan.31.2016.08.31.20.50.48 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 31 Aug 2016 20:50:50 -0700 (PDT) Subject: Re: [PATCH 2/4] cpu: expose pm_qos_resume_latency for each cpu To: Greg Kroah-Hartman , open list References: <1472114562-2736-1-git-send-email-alex.shi@linaro.org> <1472114562-2736-2-git-send-email-alex.shi@linaro.org> Cc: linux-pm@vger.kernel.org, Ulf Hansson , Daniel Lezcano From: Alex Shi Message-ID: <57C7A597.4050001@linaro.org> Date: Thu, 1 Sep 2016 11:50:47 +0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.6.0 MIME-Version: 1.0 In-Reply-To: <1472114562-2736-2-git-send-email-alex.shi@linaro.org> Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org Few commits and patch changed according to Greg's comments. Regards Alex -- 2.8.1.101.g72d917a -- To unsubscribe from this list: send the line "unsubscribe linux-pm" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html ==== >From 186c534b0b8b9649fbfce05b0b4f90f764c571a4 Mon Sep 17 00:00:00 2001 From: Alex Shi Date: Tue, 16 Aug 2016 15:29:01 +0800 Subject: [PATCH 2/4] cpu: expose pm_qos_resume_latency for each cpu Adding /sys/devices/system/cpu/cpux/power/pm_qos_resume_latency_us for each of cpus. The pm_qos_resume_latency usage defined in Documentation/ABI/testing/sysfs-devices-power The cpu-dma PM QoS constraint impacts all the cpus in the system. There is no way to let the user to choose a PM QoS constraint per cpu. The following patch exposes to the userspace a per cpu based sysfs file in order to let the userspace to change the value of the PM QoS latency constraint. This change is inoperative in its form and the cpuidle governors have to take into account the per cpu latency constraint in addition to the global cpu-dma latency constraint in order to operate properly. Signed-off-by: Alex Shi To: linux-kernel@vger.kernel.org To: Greg Kroah-Hartman Cc: linux-pm@vger.kernel.org Cc: Ulf Hansson Cc: Daniel Lezcano --- drivers/base/cpu.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/base/cpu.c b/drivers/base/cpu.c index 4c28e1a..2c3b359 100644 --- a/drivers/base/cpu.c +++ b/drivers/base/cpu.c @@ -17,6 +17,7 @@ #include #include #include +#include #include "base.h" @@ -376,6 +377,7 @@ int register_cpu(struct cpu *cpu, int num) per_cpu(cpu_sys_devices, num) = &cpu->dev; register_cpu_under_node(num, cpu_to_node(num)); + dev_pm_qos_expose_latency_limit(&cpu->dev, 0); return 0; }