netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: peter.chubb@nicta.com.au
Cc: netdev@vger.kernel.org
Subject: Re: [PATCH] Improved network performance by balancing Rx against other work
Date: Sun, 21 Mar 2010 20:21:59 -0700 (PDT)	[thread overview]
Message-ID: <20100321.202159.235697842.davem@davemloft.net> (raw)
In-Reply-To: <87tysfu05d.wl%peterc@chubb.wattle.id.au>

From: Peter Chubb <peter.chubb@nicta.com.au>
Date: Wed, 17 Mar 2010 13:55:58 +1100

> The general approach is to restrict the work done in the Rx-side
> processing to just 32 or so packets at a time then call
> sys_sched_yield() to allow other system processing to get a look in.
> Currently, NAPI processing happens in soft IRQ context, and much of it
> with interrupts off.

This is a deficiency in the locking done by such drivers.  Many
drivers lock properly and do not disable hardware interrupts during
NAPI processing.  Not only is this more efficient, it also makes
the driver more profilable.  For example, on cpus with only timer
based profiling everything done in NAPI context can be seen.

> In addition, because so much runs with interrupts disabled,
> real-time performance sucks.

Please respin your analysis to be done with a sane driver, one that
does not disable hardware interrupts.  Doing so is a driver, rather
than a fundamental, issue of NAPI.

Avoiding hardware interrupt disabling also has another huge benefit,
it means that the transmit path of the driver need not disable
hardware interrupts either since that already runs in software
interrupt disabled context.

Your analysis was essentially done with broken driver(s), so I think
I can stop reading here.

  reply	other threads:[~2010-03-22  3:21 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-17  2:55 [PATCH] Improved network performance by balancing Rx against other work Peter Chubb
2010-03-22  3:21 ` David Miller [this message]
2010-03-22  4:04   ` Peter Chubb
2010-03-22  4:11     ` David Miller
2010-03-22  4:19       ` Peter Chubb
2010-03-22  4:24         ` David Miller
2010-03-22 13:27 ` Nick Piggin

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=20100321.202159.235697842.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=netdev@vger.kernel.org \
    --cc=peter.chubb@nicta.com.au \
    /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).