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 21:11:24 -0700 (PDT) [thread overview]
Message-ID: <20100321.211124.216749316.davem@davemloft.net> (raw)
In-Reply-To: <877hp5rohj.wl%peterc@chubb.wattle.id.au>
From: Peter Chubb <peter.chubb@nicta.com.au>
Date: Mon, 22 Mar 2010 15:04:24 +1100
>>>>>> "David" == David Miller <davem@davemloft.net> writes:
>
> David> From: Peter Chubb <peter.chubb@nicta.com.au> Date: Wed, 17 Mar
> David> 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.
>
> David> This is a deficiency in the locking done by such drivers. Many
> David> drivers lock properly and do not disable hardware interrupts
> David> during NAPI processing. Not only is this more efficient, it
> David> also makes the driver more profilable. For example, on cpus
> David> with only timer based profiling everything done in NAPI context
> David> can be seen.
>
> Actually, the e1000 does not appear to disable interrupts during NAPI
> processing.
So you don't know the fundamental aspects of what you were actually
analyzing? :-)
> However, softIRQ processing is still not being preempted by a
> real-time process that wakes up.
I thought softirqs ran as threads in the -rt kernel, why doesn't
preemption work properly for those threads?
> I had a look at the Broadcom tg3, but it looks too
> hard to modify;
It's one of the best drivers in the locking area.
It doesn't take any locks at all in it's hardware interrupt handler.
It doesn't take any locks at all for RX packet processing.
And it only takes a lock for TX processing very briefly in one
specific case, when we need to wake up the TX queue because it became
full and was stopped and we need to wake it up in tg3_tx()
next prev parent reply other threads:[~2010-03-22 4:11 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
2010-03-22 4:04 ` Peter Chubb
2010-03-22 4:11 ` David Miller [this message]
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.211124.216749316.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).