netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Zoltan Kiss <zoltan.kiss@citrix.com>
To: Ian Campbell <Ian.Campbell@citrix.com>, Wei Liu <wei.liu2@citrix.com>
Cc: <xen-devel@lists.xenproject.org>, <netdev@vger.kernel.org>,
	<linux-kernel@vger.kernel.org>, <jonathan.davies@citrix.com>
Subject: Re: [PATCH net-next] xen-netback: Schedule NAPI from dealloc thread instead of callback
Date: Thu, 13 Mar 2014 15:44:37 +0000	[thread overview]
Message-ID: <5321D265.8070907@citrix.com> (raw)
In-Reply-To: <1394707350.25873.34.camel@kazak.uk.xensource.com>

On 13/03/14 10:42, Ian Campbell wrote:
> On Thu, 2014-03-13 at 10:17 +0000, Wei Liu wrote:
>> On Wed, Mar 12, 2014 at 09:04:41PM +0000, Zoltan Kiss wrote:
>>> If there are unconsumed requests in the ring, but there isn't enough free
>>> pending slots, the NAPI instance deschedule itself. As the frontend won't send
>>> any more interrupts in this case, it is the task of whoever release the pending
>>> slots to schedule the NAPI instance in this case. Originally it was done in the
>>> callback, but it's better at the end of the dealloc thread, otherwise there is
>>> a risk that the NAPI instance just deschedule itself as the dealloc thread
>>> couldn't release any used slot yet. However, as there are a lot of pending
>>> packets, NAPI will be scheduled again, and it is very unlikely that the dealloc
>>> thread can't release enough slots in the meantime.
>>>
>>
>> So this patch restores the property that "only two parties access the
>> ring", right?
>
> I think so, and therefore:
> Acked-by: Ian Campbell <ian.campbell@citrix.com>

I've just discussed this with Ian, this solution still doesn't solve the 
racing between NAPI and the dealloc thread, however it only causes some 
unnecessary napi_schedule's, not ring stalls.
There is a better solution, I'll post it as soon as it passes all the test!

Zoli

  reply	other threads:[~2014-03-13 15:44 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-12 21:04 [PATCH net-next] xen-netback: Schedule NAPI from dealloc thread instead of callback Zoltan Kiss
2014-03-13 10:17 ` Wei Liu
2014-03-13 10:42   ` Ian Campbell
2014-03-13 15:44     ` Zoltan Kiss [this message]
2014-03-13 19:48       ` 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=5321D265.8070907@citrix.com \
    --to=zoltan.kiss@citrix.com \
    --cc=Ian.Campbell@citrix.com \
    --cc=jonathan.davies@citrix.com \
    --cc=linux-kernel@vger.kernel.org \
    --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).