From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: [PATCH v4 2/9] KVM: Switch IRQ subsystem to SRCU Date: Tue, 09 Nov 2010 12:49:06 +0200 Message-ID: <4CD92722.2060908@redhat.com> References: <8cee16e41fc414c185e1d7c170ce44da19797fc1.1289215310.git.jan.kiszka@siemens.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Marcelo Tosatti , kvm , Alex Williamson , "Michael S. Tsirkin" To: Jan Kiszka Return-path: Received: from mx1.redhat.com ([209.132.183.28]:44314 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754830Ab0KIKtM (ORCPT ); Tue, 9 Nov 2010 05:49:12 -0500 In-Reply-To: <8cee16e41fc414c185e1d7c170ce44da19797fc1.1289215310.git.jan.kiszka@siemens.com> Sender: kvm-owner@vger.kernel.org List-ID: On 11/08/2010 01:21 PM, Jan Kiszka wrote: > Ack and mask notifiers typically call back into kvm_set_irq, thus may > iterate over all VCPUs of a VM. Better keep this path preemptible to > prevent that user-space can massivle influence scheduling latencies. Use > sleepable RCU for the protection of irq_routing and the notfier lists. > What about preemptible RCU, now in mainline? /* * Tree-preemptable RCU implementation for rcu_read_lock(). * Just increment ->rcu_read_lock_nesting, shared state will be updated * if we block. */ void __rcu_read_lock(void) { current->rcu_read_lock_nesting++; barrier(); /* needed if we ever invoke rcu_read_lock in rcutree.c */ } EXPORT_SYMBOL_GPL(__rcu_read_lock); (wow, quite clever in its simplicity) -- error compiling committee.c: too many arguments to function