From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: [PATCH] KVM breaks CPU hotplug Date: Tue, 27 Mar 2007 08:38:40 +0200 Message-ID: <4608BBF0.7040201@qumranet.com> References: Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Cc: kvm-devel , Andrew Morton To: "Li, Shaohua" Return-path: In-reply-to: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: kvm-devel-bounces-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org Errors-To: kvm-devel-bounces-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org List-Id: kvm.vger.kernel.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