From: "Jan Beulich" Subject: Re: [PATCH v3A 2/3] tools/libxc: allow controlling the max C-state sub-state Date: Fri, 27 Jun 2014 16:25:06 +0100 Message-ID: <53ADA8F2020000780001E187@mail.emea.novell.com> References: <1403521791-28859-1-git-send-email-ross.lagerwall@citrix.com> <1403521791-28859-3-git-send-email-ross.lagerwall@citrix.com> <53A86754020000780001C80D@mail.emea.novell.com> <1403881323.3169.65.camel@kazak.uk.xensource.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1403881323.3169.65.camel@kazak.uk.xensource.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: Ian Campbell Cc: Ross Lagerwall , Xen-devel , Ian Jackson , StefanoStabellini List-Id: xen-devel@lists.xenproject.org >>> On 27.06.14 at 17:02, wrote: > On Mon, 2014-06-23 at 16:43 +0100, Jan Beulich wrote: >> --- a/xen/include/public/sysctl.h >> +++ b/xen/include/public/sysctl.h >> @@ -354,7 +354,11 @@ struct xen_sysctl_pm_op { >> /* set/reset scheduler power saving option */ >> #define XEN_SYSCTL_pm_op_set_sched_opt_smt 0x21 >> >> - /* cpuidle max_cstate access command */ >> + /* >> + * cpuidle max C-state and max C-sub-state access command: >> + * Set cpuid to 0 for max C-state. >> + * Set cpuid to 1 for max C-sub-state. > > This seems pretty nasty. Since the sysctl interface is not fixed can't > we just turn the existing get/set_max_cstate fields into structs? Or > (less preferably) define C-sub-states to have bit 31 set. > > Can we at least get some named constants instead of 0 and 1? Any/all of this would be fine with me; what I suggested was merely an approach with as little changes as possible for an interface that wasn't defined/implemented well in the first place. Jan