|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH] xen-evtchn: Bind dyn evtchn:qemu-dm interrupt to next online VCPU
On 02/06/17 17:24, Boris Ostrovsky wrote: static int set_affinity_irq(struct irq_data *data, const struct cpumask *dest, Sure, I will do it. Why is it a percpu variable BTW? Wouldn't making it global result in better interrupt distribution? The reason for percpu instead of global, was to avoid locking. We can have a global variable (last_cpu) without locking, but value of last_cpu wont be consistent, without locks. Moreover, since irq_affinity is also used in the calculation of cpu to bind, having a percpu or global wouldn't really matter, as the result (selected_cpu) is more likely to be random (because different irqs can have different affinity). What do you guys suggest.
I think we would still require spin_lock(). spin_lock is for irq_desc. + this_cpu_write(bind_last_selected_cpu, selected_cpu); + + local_irq_disable(); + /* unmask expects irqs to be disabled */ + xen_rebind_evtchn_to_cpu(evtchn, selected_cpu); + local_irq_enable(); +} + _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx https://lists.xen.org/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |