From: "Jan Beulich" Subject: Re: [PATCH 2/4] x86/mwait_idle: Allow limiting the sub C-state Date: Wed, 18 Jun 2014 16:51:14 +0100 Message-ID: <53A1D192020000780001B962@mail.emea.novell.com> References: <1403103855-23080-1-git-send-email-ross.lagerwall@citrix.com> <1403103855-23080-3-git-send-email-ross.lagerwall@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1403103855-23080-3-git-send-email-ross.lagerwall@citrix.com> Content-Disposition: inline List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Ross Lagerwall Cc: Keir Fraser , Ian Campbell , Stefano Stabellini , Liu Jinsong , Ian Jackson , xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org >>> On 18.06.14 at 17:04, wrote: > --- a/xen/arch/x86/acpi/cpu_idle.c > +++ b/xen/arch/x86/acpi/cpu_idle.c > @@ -106,6 +106,8 @@ static uint64_t (*__read_mostly tick_to_ns)(uint64_t) = > acpi_pm_tick_to_ns; > void (*__read_mostly pm_idle_save)(void); > unsigned int max_cstate __read_mostly = ACPI_PROCESSOR_MAX_POWER - 1; > integer_param("max_cstate", max_cstate); > +unsigned int max_substate __read_mostly = ACPI_PROCESSOR_MAX_POWER - 1; For max_cstate this same initializer makes sense, but for the maximum sub-state it doesn't. I supposed this should simply be UINT_MAX. > +integer_param("max_substate", max_substate); As said before, I'd much prefer staying with just max_cstate. Simply make this a custom_param() and have the sub-state be specified after an optional comma. Furthermore you then only alter mwait-idle.c to obey this, while you leave the ACPI-based driver alone. Jan