From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751150AbdJWFMu (ORCPT ); Mon, 23 Oct 2017 01:12:50 -0400 Received: from mail-pg0-f68.google.com ([74.125.83.68]:48826 "EHLO mail-pg0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750746AbdJWFMs (ORCPT ); Mon, 23 Oct 2017 01:12:48 -0400 X-Google-Smtp-Source: ABhQp+RIz1/tXFDsKAPDGpvwX5VZwyxHi7gCErlCWIKFALdEfc3j08LA6J7PYtN9cTF9PrYUBnxZjQ== Subject: Re: [PATCH] PM / QoS: Fix device resume latency PM QoS To: "Rafael J. Wysocki" , Linux PM Cc: LKML , Reinette Chatre , Ramesh Thomas , Ulf Hansson References: <2245486.jYtPfSLF5g@aspire.rjw.lan> From: Alex Shi Message-ID: <733a08d7-0dd6-36d6-fd3c-383bcfcbfd06@linaro.org> Date: Mon, 23 Oct 2017 13:12:43 +0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0 MIME-Version: 1.0 In-Reply-To: <2245486.jYtPfSLF5g@aspire.rjw.lan> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 10/20/2017 07:27 PM, Rafael J. Wysocki wrote: > From: Rafael J. Wysocki > > The special value of 0 for device resume latency PM QoS means > "no restriction", but there are two problems with that. > > First, device resume latency PM QoS requests with 0 as the > value are always put in front of requests with positive > values in the priority lists used internally by the PM QoS > framework, causing 0 to be chosen as an effective constraint > value. However, that 0 is then interpreted as "no restriction" > effectively overriding the other requests with specific > restrictions which is incorrect. > > Second, the users of device resume latency PM QoS have no > way to specify that *any* resume latency at all should be > avoided, which is an artificial limitation in general. > > To address these issues, modify device resume latency PM QoS to > use S32_MAX as the "no constraint" value and 0 as the "no > latency at all" one and rework its users (the cpuidle menu > governor, the genpd QoS governor and the runtime PM framework) > to follow these changes. > > Also add a special "n/a" value to the corresponding user space I/F > to allow user space to indicate that it cannot accept any resume > latencies at all for the given device. > > Link: https://bugzilla.kernel.org/show_bug.cgi?id=197323 > Signed-off-by: Rafael J. Wysocki > Reported-by: Reinette Chatre Acked-by: Alex Shi