From: Frank van der Linden <Frank.Vanderlinden@Sun.COM>
To: Haitao Shan <maillists.shan@gmail.com>
Cc: xen-devel@lists.xensource.com, "Shan,
Haitao" <haitao.shan@intel.com>,
Keir Fraser <keir.fraser@eu.citrix.com>
Subject: Re: Re: [PATCH 1/4] CPU online/offline support in Xen
Date: Wed, 10 Sep 2008 10:05:06 -0600 [thread overview]
Message-ID: <48C7F032.5000400@Sun.COM> (raw)
In-Reply-To: <481ad8630809100559k2ecdb5ffidab0a2754f0cf869@mail.gmail.com>
Haitao Shan wrote:
> Agree. Placing migration in stop_machine context will definitely make
> our jobs easier. I will start making a new patch tomorrow. :)
> I place the migraton code outside the stop_machine_run context, partly
> because I am not quite sure how long it will take to migrate all the
> vcpus away. If it takes too much time, all useful works are blocked
> since all cpus are in the stop_machine context. Of course, I borrowed
> the ideas from kernel, which also let me made the desicion.
>
> 2008/9/10 Keir Fraser <keir.fraser@eu.citrix.com>:
>
>> I feel this is more complicated than it needs to be.
>>
>> How about clearing VCPUs from the offlined CPU's runqueue from the very end
>> of __cpu_disable()? At that point all other CPUs are safely in softirq
>> context with IRQs disabled, and we are running on the correct CPU (being
>> offlined). We could have a hook into the scheduler subsystem at that point
>> to break affinities, assign to different runqueues, etc. We would just need
>> to be careful not to try an IPI. :-) This approach would not need a
>> cpu_schedule_map (which is really increasing code fragility imo, by creating
>> possible extra confusion about which cpumask is the wright one to use in a
>> given situation).
>>
>> My feeling, unless I've missed something, is that this would make the patch
>> quite a bit smaller and with a smaller spread of code changes.
>>
>> -- Keir
>>
This would also address some problems I saw with the patch: race
conditions regarding migration of VCPUs, because other CPUs may call
runq_tickle. Or a hypercall may come in changing the VCPU affinity,
since things are done in 2 stages.
The changes I have are more complicated, because I was working off
3.1.4, which is our current Xen version. It doesn't have things like
stop_machine_run. But if the patch is simplified in this manner, it is
easier for us to use, and we can just backport things like
stop_machine_run for the time being.
The other issue I was seeing was that cpu_up sometimes did not succeed
in actually getting a CPU to boot. But there have been a few fixes to
smpboot.c, so I'll have to see if that always works now.
- Frank
next prev parent reply other threads:[~2008-09-10 16:05 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-09-09 8:59 [PATCH 1/4] CPU online/offline support in Xen Shan, Haitao
2008-09-10 10:43 ` Keir Fraser
2008-09-10 10:59 ` Keir Fraser
2008-09-10 12:59 ` Haitao Shan
2008-09-10 16:05 ` Frank van der Linden [this message]
2008-09-11 7:36 ` Keir Fraser
2008-09-11 8:02 ` Shan, Haitao
2008-09-11 11:12 ` Keir Fraser
2008-09-11 11:33 ` Shan, Haitao
2008-09-11 12:42 ` Keir Fraser
2008-09-11 14:15 ` Keir Fraser
2008-09-11 14:23 ` Christoph Egger
2008-09-11 14:32 ` Keir Fraser
2008-09-11 14:47 ` Keir Fraser
2008-09-17 4:17 ` Gavin Maltby
2008-09-17 7:05 ` Jan Beulich
2008-09-17 9:20 ` Jiang, Yunhong
2008-09-17 9:43 ` Christoph Egger
2008-09-17 13:14 ` Ke, Liping
2008-09-18 3:56 ` Jiang, Yunhong
2008-09-18 7:20 ` Keir Fraser
2008-09-18 8:13 ` Jiang, Yunhong
2008-09-18 9:11 ` Keir Fraser
2008-09-18 15:17 ` Jiang, Yunhong
2008-09-11 16:00 ` Shan, Haitao
2008-09-11 16:52 ` Keir Fraser
2008-09-11 23:30 ` Shan, Haitao
-- strict thread matches above, loose matches on Subject: below --
2008-09-12 2:22 Tian, Kevin
2008-09-12 6:02 ` Keir Fraser
2008-09-12 6:04 ` Tian, Kevin
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=48C7F032.5000400@Sun.COM \
--to=frank.vanderlinden@sun.com \
--cc=haitao.shan@intel.com \
--cc=keir.fraser@eu.citrix.com \
--cc=maillists.shan@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.