netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: sowmini.varadhan@oracle.com
Cc: raghuram.kothakota@oracle.com, netdev@vger.kernel.org
Subject: Re: [PATCH net-next 0/2] sunvnet: Packet processing in non-interrupt context.
Date: Mon, 06 Oct 2014 15:25:26 -0400 (EDT)	[thread overview]
Message-ID: <20141006.152526.965519223260573233.davem@davemloft.net> (raw)
In-Reply-To: <20141006160418.GA3604@oracle.com>

From: Sowmini Varadhan <sowmini.varadhan@oracle.com>
Date: Mon, 6 Oct 2014 12:04:18 -0400

>> I think you should be able to get rid of all of the in-driver
>> locking in the fast paths.
>> 
>> NAPI ->poll() is non-reentrant, so all RX processing occurs
>> strictly in a serialized environment.
>> 
>> Once you do TX reclaim in NAPI context, then all you have to do is
>> take the generic netdev TX queue lock during the evaluation of whether
>> to wakeup the TX queue or not.  Worst case you need to hold the
>> TX netdev queue lock across the whole TX reclaim operation.
>> 
>> The VIO lock really ought to be entirely superfluous in the data
>> paths.
> 
> A few clarifications, since there are more driver-examples using NAPI for
> Rx than for Tx reclaim

Those drivers fully go against our recommendations, we always say that
TX reclaim should also run from NAPI because it liberates SKBs that
therefore become available for RX processing.

> But we still need to hold the vio lock around the ldc_write 
> (and also around dring write) in vnet_start_xmit, right?

You might be able to avoid it, you're fully serialized by the TX queue
lock.

  reply	other threads:[~2014-10-06 19:25 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-01 18:56 [PATCH net-next 0/2] sunvnet: Packet processing in non-interrupt context Sowmini Varadhan
2014-10-01 19:10 ` Eric Dumazet
2014-10-01 19:50 ` David Miller
2014-10-01 19:55   ` Sowmini Varadhan
2014-10-01 20:15     ` David Miller
2014-10-01 20:23       ` Sowmini Varadhan
2014-10-01 20:25         ` David Miller
2014-10-02 20:12           ` Sowmini Varadhan
2014-10-02 20:43             ` David Miller
2014-10-03 14:40               ` Sowmini Varadhan
2014-10-03 19:08                 ` David Miller
2014-10-06 16:04                   ` Sowmini Varadhan
2014-10-06 19:25                     ` David Miller [this message]
2014-10-06 19:31                       ` Sowmini Varadhan
2014-10-06 19:37                         ` David Miller
2014-10-10  1:10                         ` Raghuram Kothakota
2014-10-10  4:36                           ` David Miller
2014-10-10  4:56                             ` Raghuram Kothakota
2014-10-10  5:03                               ` David Miller
2014-10-10  5:13                                 ` Raghuram Kothakota
2014-10-15 14:05                   ` sunvnet NAPIfication Sowmini Varadhan
  -- strict thread matches above, loose matches on Subject: below --
2014-10-01 20:24 [PATCH net-next 0/2] sunvnet: Packet processing in non-interrupt context Sowmini Varadhan

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=20141006.152526.965519223260573233.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=netdev@vger.kernel.org \
    --cc=raghuram.kothakota@oracle.com \
    --cc=sowmini.varadhan@oracle.com \
    /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).