[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [PATCH RFC] evtchn: add early-out to evtchn_move_pirqs()
Hi Jan, On 08/04/2022 08:16, Jan Beulich wrote: See the code comment. The higher the rate of vCPU-s migrating across pCPU-s, the less useful this attempted optimization actually is. With credit2 the migration rate looks to be unduly high even on mostly idle systems, and hence on large systems lock contention here isn't very difficult to observe. "high" and "large" is quite vague. Do you have more details on where you observed this issue and the improvement after this patch? Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx> --- a/xen/common/event_channel.c +++ b/xen/common/event_channel.c @@ -1559,6 +1559,16 @@ void evtchn_move_pirqs(struct vcpu *v) unsigned int port; struct evtchn *chn;+ /*+ * The work done below is an attempt to keep pIRQ-s on the pCPU-s that the + * vCPU-s they're to be delivered to run on. In order to limit lock + * contention, check for an empty list prior to acquiring the lock. In the + * worst case a pIRQ just bound to this vCPU will be delivered elsewhere + * until the vCPU is migrated (again) to another pCPU. + */ AFAIU, the downside is another pCPU (and therefore vCPU) will get disturbed by the interrupt. Maybe we should revive "evtchn: convert domain event lock to an r/w one"? + if ( !v->pirq_evtchn_head ) + return; + spin_lock(&d->event_lock); for ( port = v->pirq_evtchn_head; port; port = chn->u.pirq.next_port ) { Cheers, -- Julien Grall
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |