From: Juergen Gross <juergen.gross@ts.fujitsu.com>
To: Keir Fraser <keir.xen@gmail.com>
Cc: "Przywara, Andre" <Andre.Przywara@amd.com>,
"xen-devel@lists.xensource.com" <xen-devel@lists.xensource.com>
Subject: Re: [Patch] remove unneeded test for cpu in cpupool
Date: Wed, 16 Mar 2011 11:36:43 +0100 [thread overview]
Message-ID: <4D8092BB.4030006@ts.fujitsu.com> (raw)
In-Reply-To: <C9A63DD6.14E2D%keir.xen@gmail.com>
On 03/16/11 11:13, Keir Fraser wrote:
> On 16/03/2011 06:34, "Juergen Gross"<juergen.gross@ts.fujitsu.com> wrote:
>
>> Hi,
>>
>> attached patch removes an unneeded check in vcpu_migrate().
>>
>> Andre, could you please give it a try on your 48 core machine with
>>
>> xl cpupool-numa-split
>>
>> I'd like to make sure the check is really not needed. On my machines it worked
>> okay, but your machine seems to trigger races more easily.
>
> Could you BUG_ON failing this test when we exit the retry loop? It seems a
> suitable loop post-condition.
Not easily. The cpu_valid mask of a cpupool might change between the call of
pick_cpu and the test. In the normal case this is okay, as removing a cpu
from a cpupool (which is the critical case) will call cpu_disable_scheduler()
after removing the cpu from the mask, which will migrate the vcpu away.
Using a saved copy of cpu_valid for the test isn't working either, if a cpu
is added to and removed from the cpupool in a very short time. I would have
to use a generation count for the cpu_valid mask and do the check only if
the count didn't change. I think this is little bit of overkill here, but if
you'd prefer it, I can do a patch.
Juergen
--
Juergen Gross Principal Developer Operating Systems
TSP ES&S SWE OS6 Telephone: +49 (0) 89 3222 2967
Fujitsu Technology Solutions e-mail: juergen.gross@ts.fujitsu.com
Domagkstr. 28 Internet: ts.fujitsu.com
D-80807 Muenchen Company details: ts.fujitsu.com/imprint.html
next prev parent reply other threads:[~2011-03-16 10:36 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-03-16 6:34 [Patch] remove unneeded test for cpu in cpupool Juergen Gross
2011-03-16 10:13 ` Keir Fraser
2011-03-16 10:36 ` Juergen Gross [this message]
2011-03-16 11:14 ` Keir Fraser
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=4D8092BB.4030006@ts.fujitsu.com \
--to=juergen.gross@ts.fujitsu.com \
--cc=Andre.Przywara@amd.com \
--cc=keir.xen@gmail.com \
--cc=xen-devel@lists.xensource.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.