From: Keir Fraser <keir.fraser@eu.citrix.com>
To: "Jiang, Yunhong" <yunhong.jiang@intel.com>,
"xen-devel@lists.xensource.com" <xen-devel@lists.xensource.com>
Subject: Re: [PATCH] Allocate vmcs pages when system booting
Date: Thu, 12 Nov 2009 11:22:44 +0000 [thread overview]
Message-ID: <C721A084.19F5B%keir.fraser@eu.citrix.com> (raw)
In-Reply-To: <E2263E4A5B2284449EEBD0AAB751098418E5557546@PDSMSX501.ccr.corp.intel.com>
On 12/11/2009 10:52, "Jiang, Yunhong" <yunhong.jiang@intel.com> wrote:
> Currently the VMCS page is allocated when the CPU is brought-up and
> identified, and then spin_debug_enable() is called.
>
> This does not work for cpu hot-add. When hot-added CPU is brought-up and try
> to allocate the vmcs page, it will hit check_lock, because irq is disabled
> still.
>
> This patch allocate the vmcs pages for all possible pages when system booting,
> so that we don't allocate vmcs anymore when secondary CPU is up.
>
> Signed-off-by: Jiang, Yunhong <yunhong.jiang@intel.com>
A general point: using cpu_possible_map is not a good idea any longer, since
it is going to be all-ones as soon as your physical cpu hotplug patches go
in (I don't intend to make that a build-time option). Hence we could
potentially massively over-allocate pages with this approach.
The good news is that, when bringing a CPU online, we don't need to worry
about acquiring IRQ-unsafe locks with IRQS disabled until the CPU is added
to the cpu_online_map. This is because the race we are trying to avoid with
the spin-debug checks involves rendezvous of CPUs via IPIs, and a CPU not in
cpu_online_map will never get waited on by others.
So, your better fix would be to spin_debug_disable() at the top of
start_secondary(), and spin_debug_enable() just before
cpu_set(...online_map).
Can you try this alternative fix please?
-- Keir
next prev parent reply other threads:[~2009-11-12 11:22 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-11-12 10:52 [PATCH] Allocate vmcs pages when system booting Jiang, Yunhong
2009-11-12 11:22 ` Keir Fraser [this message]
2009-11-12 14:58 ` Jiang, Yunhong
2009-11-12 15:04 ` Keir Fraser
2009-11-12 15:15 ` Jiang, Yunhong
2010-01-15 9:06 ` Jiang, Yunhong
2010-01-15 9:30 ` Jan Beulich
2010-01-15 10:31 ` Keir Fraser
2010-01-17 2:02 ` Jiang, Yunhong
2010-01-17 21:35 ` Keir Fraser
2010-01-18 8:11 ` Keir Fraser
2010-01-18 8:22 ` Jiang, Yunhong
2010-03-18 10:45 ` Jan Beulich
2010-03-18 10:51 ` Keir Fraser
2010-03-19 2:17 ` Jiang, Yunhong
2010-01-15 10:28 ` 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=C721A084.19F5B%keir.fraser@eu.citrix.com \
--to=keir.fraser@eu.citrix.com \
--cc=xen-devel@lists.xensource.com \
--cc=yunhong.jiang@intel.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 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).