From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754562AbbIICPc (ORCPT ); Tue, 8 Sep 2015 22:15:32 -0400 Received: from mga11.intel.com ([192.55.52.93]:7819 "EHLO mga11.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754510AbbIICP0 (ORCPT ); Tue, 8 Sep 2015 22:15:26 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.17,493,1437462000"; d="scan'208";a="765133253" From: "Chen, Yu C" To: "Rafael J. Wysocki" , "kristen@linux.intel.com" CC: "viresh.kumar@linaro.org" , "linux-pm@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "Zhang, Rui" , "lenb@kernel.org" , Seiichi Ikarashi Subject: RE: [PATCH][rfc] intel_pstate: Fix user input of min/max to legal policy region Thread-Topic: [PATCH][rfc] intel_pstate: Fix user input of min/max to legal policy region Thread-Index: AQHQ1LFj+ZeTaxDRZ0m4TWuOpIBN2Z4xPhaAgAJhhOA= Date: Wed, 9 Sep 2015 02:15:00 +0000 Message-ID: <36DF59CE26D8EE47B0655C516E9CE6401D4A77CE@SHSMSX101.ccr.corp.intel.com> References: <1439351359-29532-1-git-send-email-yu.c.chen@intel.com> <1972415.RSWZSVEEko@vostro.rjw.lan> In-Reply-To: <1972415.RSWZSVEEko@vostro.rjw.lan> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from base64 to 8bit by mail.home.local id t895tWxN024936 Hi ,Rafael > -----Original Message----- > From: Rafael J. Wysocki [mailto:rjw@rjwysocki.net] > Sent: Tuesday, September 08, 2015 5:47 AM > To: Chen, Yu C; kristen@linux.intel.com > Cc: viresh.kumar@linaro.org; linux-pm@vger.kernel.org; linux- > kernel@vger.kernel.org; Zhang, Rui; lenb@kernel.org > Subject: Re: [PATCH][rfc] intel_pstate: Fix user input of min/max to legal > policy region > > On Wednesday, August 12, 2015 11:49:19 AM Chen Yu wrote: > > In current code, if system is using performance policy, user can > > modify the max_perf_pct to any values lower than 100: > > > > $ grep . /sys/devices/system/cpu/intel_pstate/m*_perf_pct > > /sys/devices/system/cpu/intel_pstate/max_perf_pct:100 > > /sys/devices/system/cpu/intel_pstate/min_perf_pct:100 > > > > $ echo 80 > /sys/devices/system/cpu/intel_pstate/max_perf_pct > > > > $ grep . /sys/devices/system/cpu/intel_pstate/m*_perf_pct > > /sys/devices/system/cpu/intel_pstate/max_perf_pct:80 > > /sys/devices/system/cpu/intel_pstate/min_perf_pct:100 > > > > the max_perf_pct above is lower than min_perf_pct, which is not > > reasonable. > > > > This patch solves this problem by clamping min_perf_pct and > > max_perf_pct to be strictly inside [min_policy_pct,max_policy_pct]. > > > > Signed-off-by: Chen Yu > > Looks reasonable to me. > > Kristen, any objections? > Thanks for your reply! According to suggestion from Seiichi, will re-send a V2 version patch, to make some update. Best Regards, Yu ÿôèº{.nÇ+‰·Ÿ®‰­†+%ŠËÿ±éݶ¥Šwÿº{.nÇ+‰·¥Š{±þG«�éÿŠ{ayºʇڙë,j­¢f£¢·hš�ï�êÿ‘êçz_è®(­éšŽŠÝ¢j"�ú¶m§ÿÿ¾«þG«�éÿ¢¸?™¨è­Ú&£ø§~�á¶iO•æ¬z·švØ^¶m§ÿÿà ÿ¶ìÿ¢¸?–I¥