[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH v2 1/5] x86/cpuidle: switch to uniform meaning of "max_cstate="


  • To: Roger Pau Monné <roger.pau@xxxxxxxxxx>
  • From: Jan Beulich <JBeulich@xxxxxxxx>
  • Date: Tue, 16 Jul 2019 11:25:20 +0000
  • Accept-language: en-US
  • Arc-authentication-results: i=1; mx.microsoft.com 1;spf=pass smtp.mailfrom=suse.com;dmarc=pass action=none header.from=suse.com;dkim=pass header.d=suse.com;arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=q9y8FRaeNGQyONBqoPFGgkXNtsDjahBP9mHbSVUj5R8=; b=g812yJ81KD3xDwdBY/VIDx5ILfzWm1ADbf0deACtxofUdvqwpIbDqboJamt2VjZuweiT9eb8oGt6j6BO8/YlcpgUPVdpVvwnOnI7snQYgoAWmXbIs1U9U6cfNdIq1xb/t/P81LBckQ64ZP2UA8bBp7ad9kslmmUVbFm/Lii2B1wg/kMKSS0qkaaf8ikVtTnJLd0PnKaxH14vDs5Rqob12WiXokew10P/mC1KcmmCs8LUID0EWYsl23ACxKu97QFrzQb7j7/+QNqp3ejzqoFeeB9gw0i0gAw9HgPBeGX0mbLV5hpg5LsaULx7QGKLxAoV4ZgquEXkhMZke4BnuGXp5g==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=NvnaPns0qdDE3ORGsEni5vZB9TNWsRH6w8/1zPdWdYOe0yBynhLiekwK05islGL5LSs+Sf5Ge1ZEs06Uq6K+owoY+Wid16xypcw2rgD6wrdAmVS9H0gdM5xCdULcX9mXx1Kq6iMAWyvTpwffK+SfgCeZtX3zoHw6MQIM32JU1cfpAvaLA7d9WmKt4LUp9dVf0maRZsIiicWzlli4OyLmZHOYpGIdTztSMEoukkzIh+IuIQa0qGErocNSe4jET8mIFy62oRetMijtvu3fsSAwxnIpseiy8vnWy+YWVlXt5cVjE4qjtNV/xPOw21V21ypUOQaDGb4FvYuWDfVDr880Ew==
  • Authentication-results: spf=none (sender IP is ) smtp.mailfrom=JBeulich@xxxxxxxx;
  • Cc: AndrewCooper <andrew.cooper3@xxxxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Ian Jackson <ian.jackson@xxxxxxxxxx>
  • Delivery-date: Tue, 16 Jul 2019 11:25:46 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
  • Thread-index: AQHVMZ8qQ6Jc8o6GrEKsOZ2R6D7BYabNIsVkgAAMQgA=
  • Thread-topic: [Xen-devel] [PATCH v2 1/5] x86/cpuidle: switch to uniform meaning of "max_cstate="

On 16.07.2019 12:39, Roger Pau Monné  wrote:
> On Wed, Jul 03, 2019 at 12:59:36PM +0000, Jan Beulich wrote:
>> While the MWAIT idle driver already takes it to mean an actual C state,
>> the ACPI idle driver so far used it as a list index. The list index,
>> however, is an implementation detail of Xen and affected by firmware
>> settings (i.e. not necessarily uniform for a particular system).
>>
>> While touching this code also avoid invoking menu_get_trace_data()
>> when tracing is not active. For consistency do this also for the
>> MWAIT driver.
>>
>> Note that I'm intentionally not adding any sorting logic to set_cx():
>> Before and after this patch we assume entries to arrive in order, so
>> this would be an orthogonal change.
>>
>> Take the opportunity and add minimal documentation for the command line
>> option.
>>
>> Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>
> 
> Just one comment, regardless of which:
> 
> Reviewed-by: Roger Pau Monné <roger.pau@xxxxxxxxxx>

Thanks.

>> --- a/xen/arch/x86/acpi/cpu_idle.c
>> +++ b/xen/arch/x86/acpi/cpu_idle.c
>> @@ -103,7 +103,7 @@ bool lapic_timer_init(void)
>>    }
>>    
>>    void (*__read_mostly pm_idle_save)(void);
>> -unsigned int max_cstate __read_mostly = ACPI_PROCESSOR_MAX_POWER - 1;
>> +unsigned int max_cstate __read_mostly = UINT_MAX;
> 
> Not sure whether it would be clearer to just use
> XEN_SYSCTL_CX_UNLIMITED here instead of UINT_MAX.

Well, the patch adds a BUILD_BUG_ON() to verify both match. If
they didn't, translation would be required. The variable and its
use strictly want it to be UINT_MAX.

Jan
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.