[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] interrupt moving and NAPI scheduling

On Thu, 2014-05-15 at 17:26 +0100, Zoltan Kiss wrote:
> Hi,
> Let me bump this question: how does the kernel make sure that if an 
> interrupt is moved away from CPU X to Y (e.g. by irqbalance), the NAPI 
> instance already scheduled on CPU Y won't race with the interrupt? I 
> mean the following scenario:
> 1. instance calls napi_complete on CPU X
> 2. that removes the instance from the list
> 3. interrupt happens on CPU Y
> 4. "!test_and_set_bit(NAPI_STATE_SCHED, &n->state)" fails, as the bit is 
> still set
> 5. instance not added to the list therefore
> 6. napi_complete on CPU X clear the bit
> My assumption is that when the interrupt moved, the kernel makes sure 
> the NAPI instance won't get scheduled on the old CPU, but I'm not sure 
> about it

Interrupts are supposed to be disabled at the time we call

Some drivers are buggy.

Xen-devel mailing list



Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.