From: David Vrabel <david.vrabel@citrix.com>
To: Wei Liu <wei.liu2@citrix.com>
Cc: <netdev@vger.kernel.org>, <xen-devel@lists.xenproject.org>,
Ian Campbell <ian.campbell@citrix.com>
Subject: Re: [PATCH] xen-netback: fix race between napi_complete() and interrupt handler
Date: Tue, 25 Mar 2014 15:08:15 +0000 [thread overview]
Message-ID: <53319BDF.9040001@citrix.com> (raw)
In-Reply-To: <20140325145021.GF31766@zion.uk.xensource.com>
On 25/03/14 14:50, Wei Liu wrote:
> You forgot to target this patch to "net" tree in subject line.
>
> On Tue, Mar 25, 2014 at 02:08:25PM +0000, David Vrabel wrote:
>> When the NAPI budget was not all used, xenvif_poll() would call
>> napi_complete() /after/ enabling the interrupt. This resulted in a
>> race between the napi_complete() and the napi_schedule() in the
>> interrupt handler. The use of local_irq_save/restore() avoided by
>> race iff the handler is running on the same CPU but not if it was
>> running on a different CPU.
>>
>
> OK, I understand this issue now. You mentioned it in the other email
> which made me a bit confused.
>
> Just curious, how do you trigger this? By re-binding the interrupt to
> another CPU when xenvif_poll is running? I used to run irqbalance (the
> one that works with xen virtual interrupt) but could not trigger a race.
> Probably the race window is too small to trigger?
I haven't seen the race occur, but I've not tried to trigger it.
It may be that as Zoltan says, that the race is harmless but I still
think avoiding the race entirely is preferable.
David
next prev parent reply other threads:[~2014-03-25 15:08 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-03-25 14:08 [PATCH] xen-netback: fix race between napi_complete() and interrupt handler David Vrabel
2014-03-25 14:41 ` Zoltan Kiss
2014-05-15 16:26 ` interrupt moving and NAPI scheduling Zoltan Kiss
2014-05-15 17:33 ` Eric Dumazet
2014-03-25 14:50 ` [PATCH] xen-netback: fix race between napi_complete() and interrupt handler Wei Liu
2014-03-25 15:08 ` David Vrabel [this message]
2014-03-26 20:33 ` David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=53319BDF.9040001@citrix.com \
--to=david.vrabel@citrix.com \
--cc=ian.campbell@citrix.com \
--cc=netdev@vger.kernel.org \
--cc=wei.liu2@citrix.com \
--cc=xen-devel@lists.xenproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).