public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: Avi Kivity <avi-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
To: "Li, Shaohua" <shaohua.li-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
Cc: kvm-devel
	<kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org>,
	Andrew Morton
	<akpm-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org>
Subject: Re: [PATCH] KVM breaks CPU hotplug
Date: Tue, 27 Mar 2007 08:38:40 +0200	[thread overview]
Message-ID: <4608BBF0.7040201@qumranet.com> (raw)
In-Reply-To: <FC1D1B23302A22499C60C967336B2AE00100CB7F-wq7ZOvIWXbNpB2pF5aRoyrfspsVTdybXVpNB7YpNyf8@public.gmane.org>

Li, Shaohua wrote:
> How about take cpu hotplug lock for kvm_vm_ioctl and kvm_vcpu_ioctl?
>
>   

That will serialize calls to these functions, and we want parallel 
execution of kvm_vcpu_ioctl().  We could make it a reader-writer lock, 
but...

I think that adding a

    raw_notifier_call_chain(&cpu_chain, CPU_DYING, NULL);

in take_cpu_down() solve the problem.  The semantics of that would be 
that the chain is executed on the dying cpu, without being allowed to 
fail, and requiring atomic execution.  I don't know whether that would 
acceptable to the cpu hotplug maintainers.

-- 
Do not meddle in the internals of kernels, for they are subtle and quick to panic.


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV

      parent reply	other threads:[~2007-03-27  6:38 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-03-26  8:48 [PATCH] KVM breaks CPU hotplug Shaohua Li
     [not found] ` <1174898893.14063.7.camel-yAZKuqJtXNMXR+D7ky4Foa2pdiUAq4bhAL8bYrjMMd8@public.gmane.org>
2007-03-26  9:11   ` Avi Kivity
     [not found]     ` <46078E2C.9010100-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
2007-03-26 10:58       ` Avi Kivity
     [not found]         ` <4607A749.30603-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
2007-03-27  1:12           ` Li, Shaohua
     [not found]             ` <FC1D1B23302A22499C60C967336B2AE00100CB7F-wq7ZOvIWXbNpB2pF5aRoyrfspsVTdybXVpNB7YpNyf8@public.gmane.org>
2007-03-27  6:38               ` Avi Kivity [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=4608BBF0.7040201@qumranet.com \
    --to=avi-atkuwr5tajbwk0htik3j/w@public.gmane.org \
    --cc=akpm-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org \
    --cc=kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org \
    --cc=shaohua.li-ral2JQCrhuEAvxtiuMwx3w@public.gmane.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