From: "Jan Beulich" <JBeulich@suse.com>
To: Ross Lagerwall <ross.lagerwall@citrix.com>
Cc: Liu Jinsong <jinsong.liu@alibaba-inc.com>,
Xen-devel <xen-devel@lists.xen.org>
Subject: Re: [PATCH v3 1/3] x86: Allow limiting the max C-state sub-state
Date: Thu, 26 Jun 2014 14:38:30 +0100 [thread overview]
Message-ID: <53AC3E76020000780001DB42@mail.emea.novell.com> (raw)
In-Reply-To: <53AAF023.7040108@citrix.com>
>>> On 25.06.14 at 17:52, <ross.lagerwall@citrix.com> wrote:
> On 06/25/2014 01:37 PM, Jan Beulich wrote:
>>>>> On 23.06.14 at 13:09, <ross.lagerwall@citrix.com> wrote:
>>> --- a/xen/arch/x86/cpu/mwait-idle.c
>>> +++ b/xen/arch/x86/cpu/mwait-idle.c
>>> @@ -330,7 +330,9 @@ static void mwait_idle(void)
>>> (next_state = cpuidle_current_governor->select(power)) > 0) {
>>> do {
>>> cx = &power->states[next_state];
>>> - } while (cx->type > max_cstate && --next_state);
>>> + } while ((cx->type > max_cstate || (cx->type == max_cstate &&
>>> + MWAIT_HINT2SUBSTATE(cx->address) > max_csubstate)) &&
>>> + --next_state);
>>
>> In the context of the above comment it then is questionable
>> whether here (and similarly in acpi_processor_idle()) using the
>> MWAIT parameter value for the comparison here is really
>> suitable: If you look at hsw_cstates[] and atom_cstates[] you'll
>> see that there we have states with just a single non-zero sub-
>> state (which the logic here would exclude in certain cases when
>> one would expect it to be permitted).
>>
>
> When would one expect them to be permitted that this logic would exclude?
>
> C7s-HSW has a C-state of 4 and a sub-state of 2. If you set max_cstate
> = 4, then no C-state > 4 will be selected.
> Similarly, if you select max_csubstate = 2, then no sub C-state > 2 will
> be selected (if max_cstate = 4). This seems congruous to me.
Actually I think I got it the wrong way round: Taking your example, if
one sets max_csubstate = 1, one may expect the 1st (not necessarily
the one numbered "1") to still be permitted (much like we also don't tie
max_cstate to actual values to be passed to MWAIT). Just look at how
much more interesting the sub-states get with the ports from recent
Linux that I posted earlier today.
Jan
next prev parent reply other threads:[~2014-06-26 13:38 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-06-23 11:09 [PATCH v3 0/3] Support controlling the max C-state sub-state Ross Lagerwall
2014-06-23 11:09 ` [PATCH v3 1/3] x86: Allow limiting " Ross Lagerwall
2014-06-25 12:37 ` Jan Beulich
2014-06-25 15:52 ` Ross Lagerwall
2014-06-26 13:38 ` Jan Beulich [this message]
2014-07-07 15:14 ` Ross Lagerwall
2014-07-23 7:34 ` Jan Beulich
2014-07-23 12:56 ` Ross Lagerwall
2014-06-23 11:09 ` [PATCH v3 2/3] tools/libxc: Alow controlling " Ross Lagerwall
2014-06-23 15:43 ` [PATCH v3A 2/3] tools/libxc: allow " Jan Beulich
2014-06-23 16:00 ` Ross Lagerwall
2014-06-27 15:02 ` Ian Campbell
2014-06-27 15:25 ` Jan Beulich
2014-06-27 15:26 ` Ian Campbell
2014-06-23 11:09 ` [PATCH v3 3/3] xenpm: Allow " Ross Lagerwall
2014-06-27 15:03 ` Ian Campbell
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=53AC3E76020000780001DB42@mail.emea.novell.com \
--to=jbeulich@suse.com \
--cc=jinsong.liu@alibaba-inc.com \
--cc=ross.lagerwall@citrix.com \
--cc=xen-devel@lists.xen.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).