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: 9308315 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 9062F607D6 for ; Thu, 1 Sep 2016 03:50:54 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8D3D829176 for ; Thu, 1 Sep 2016 03:50:54 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8211D29178; Thu, 1 Sep 2016 03:50:54 +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=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID 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 039BA29176 for ; Thu, 1 Sep 2016 03:50:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754950AbcIADuw (ORCPT ); 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 X-Virus-Scanned: ClamAV using ClamSMTP Few commits and patch changed according to Greg's comments. Regards Alex ==== 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; }