xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: "Jan Beulich" <JBeulich@suse.com>
To: "Andrew Cooper" <andrew.cooper3@citrix.com>,
	"xen-devel" <xen-devel@lists.xenproject.org>
Cc: Ian Jackson <Ian.Jackson@eu.citrix.com>,
	Wei Liu <wei.liu2@citrix.com>,
	Roger Pau Monne <roger.pau@citrix.com>
Subject: Re: [Xen-devel] [PATCH 5/5] tools/libxc: allow controlling the max C-state sub-state
Date: Tue, 11 Jun 2019 06:50:24 -0600	[thread overview]
Message-ID: <5CFFA3900200007800237078@prv1-mh.provo.novell.com> (raw)
In-Reply-To: <298febae-cc8c-23c4-ee42-2c9ca8643d21@citrix.com>

>>> On 10.06.19 at 18:54, <andrew.cooper3@citrix.com> wrote:
> On 23/05/2019 13:19, Jan Beulich wrote:
>> From: Ross Lagerwall <ross.lagerwall@citrix.com>
>>
>> Signed-off-by: Ross Lagerwall <ross.lagerwall@citrix.com>
>>
>> Make handling in do_pm_op() more homogeneous: Before interpreting
>> op->cpuid as such, handle all operations not acting on a particular
>> CPU. Also expose the setting via xenpm.
>>
>> Signed-off-by: Jan Beulich <jbeulich@suse.com>
>>
>> --- a/tools/libxc/xc_pm.c
>> +++ b/tools/libxc/xc_pm.c
>> @@ -379,7 +379,7 @@ int xc_get_cpuidle_max_cstate(xc_interfa
>>      }
>>      sysctl.cmd = XEN_SYSCTL_pm_op;
>>      sysctl.u.pm_op.cmd = XEN_SYSCTL_pm_op_get_max_cstate;
>> -    sysctl.u.pm_op.cpuid = 0;
>> +    sysctl.u.pm_op.cpuid = type;
> 
> What is type, and why it is being put into a field called cpuid?

Since this isn't code I wrote I'm inclined to say "see the comment
in the public header". Given the pretty special case this is about
I'm not really fancying introducing new structures / fields in
sysctl.h, but judging from your reply you presumably want me to.

>> --- a/tools/misc/xenpm.c
>> +++ b/tools/misc/xenpm.c
>> @@ -1120,13 +1128,17 @@ void get_vcpu_migration_delay_func(int a
>>  
>>  void set_max_cstate_func(int argc, char *argv[])
>>  {
>> -    int value;
>> +    int value, subval = XEN_SYSCTL_CX_UNLIMITED;
>>      char buf[12];
>>  
>> -    if ( argc != 1 ||
>> +    if ( argc < 1 || argc > 2 ||
>>           (sscanf(argv[0], "%d", &value) == 1
>>            ? value < 0
>> -          : (value = XEN_SYSCTL_CX_UNLIMITED, strcmp(argv[0], "unlimited"))) )
>> +          : (value = XEN_SYSCTL_CX_UNLIMITED, strcmp(argv[0], "unlimited"))) ||
>> +         (argc == 2 &&
>> +          (sscanf(argv[1], "%d", &subval) == 1
>> +           ? subval < 0
>> +           : (subval = XEN_SYSCTL_CX_UNLIMITED, strcmp(argv[1], "unlimited")))) )
> 
> Usage update?

Well, yes. That's what I get for picking up other folks' patches.

Jan



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

      reply	other threads:[~2019-06-11 12:50 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-23 12:06 [PATCH 0/5] x86: CPU idle management adjustments Jan Beulich
2019-05-23 12:06 ` [Xen-devel] " Jan Beulich
2019-05-23 12:16 ` [PATCH 1/5] x86/cpuidle: switch to uniform meaning of "max_cstate=" Jan Beulich
2019-05-23 12:16   ` [Xen-devel] " Jan Beulich
2019-06-10 15:48   ` Andrew Cooper
2019-06-11 12:13     ` Jan Beulich
2019-05-23 12:17 ` [PATCH 2/5] x86/cpuidle: really use C1 for "urgent" CPUs Jan Beulich
2019-05-23 12:17   ` [Xen-devel] " Jan Beulich
2019-06-10 15:50   ` Andrew Cooper
2019-05-23 12:18 ` [PATCH 3/5] x86/AMD: make C-state handling independent of Dom0 Jan Beulich
2019-05-23 12:18   ` [Xen-devel] " Jan Beulich
2019-06-10 16:28   ` Andrew Cooper
2019-06-11 12:42     ` Jan Beulich
2019-06-18 17:22       ` Woods, Brian
2019-06-19  6:20         ` Jan Beulich
2019-06-19 15:54           ` Woods, Brian
2019-06-21  6:37             ` Jan Beulich
2019-06-21 14:29               ` Woods, Brian
2019-06-21 14:56                 ` Jan Beulich
2019-06-21 15:26                   ` Woods, Brian
2019-05-23 12:18 ` [PATCH 4/5] x86: allow limiting the max C-state sub-state Jan Beulich
2019-05-23 12:18   ` [Xen-devel] " Jan Beulich
2019-06-10 16:43   ` Andrew Cooper
2019-06-11 12:46     ` Jan Beulich
2019-05-23 12:19 ` [PATCH 5/5] tools/libxc: allow controlling " Jan Beulich
2019-05-23 12:19   ` [Xen-devel] " Jan Beulich
2019-05-24 14:00   ` Wei Liu
2019-05-24 14:00     ` [Xen-devel] " Wei Liu
2019-06-10 16:54   ` Andrew Cooper
2019-06-11 12:50     ` Jan Beulich [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5CFFA3900200007800237078@prv1-mh.provo.novell.com \
    --to=jbeulich@suse.com \
    --cc=Ian.Jackson@eu.citrix.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=roger.pau@citrix.com \
    --cc=wei.liu2@citrix.com \
    --cc=xen-devel@lists.xenproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).