Re: [PATCH v4 2/9] KVM: Switch IRQ subsystem to SRCU

Avi Kivity
2010-11-09T10:49:12Z

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