From: David Miller <davem@davemloft.net>
To: eric.dumazet@gmail.com
Cc: netdev@vger.kernel.org
Subject: Re: [Just for fun] loopback: avoid softirq on most transmits
Date: Thu, 28 Oct 2010 13:09:17 -0700 (PDT) [thread overview]
Message-ID: <20101028.130917.179938102.davem@davemloft.net> (raw)
In-Reply-To: <1288295326.2711.35.camel@edumazet-laptop>
From: Eric Dumazet <eric.dumazet@gmail.com>
Date: Thu, 28 Oct 2010 21:48:46 +0200
> With the introduction of xmit_recursion percpu variable, its pretty
> cheap to check our recursion level in loopback transmit, and avoid
> raising softirq.
>
> Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
> ---
> tbench faster by 4%, sorry I couldnt resist...
Hehehe :-)
Maybe even that limit is low enough to prevent stack overflow
situations even when doing NFS over a loopback to a raid volume using
XFS as the filesystem which seems to be the standard stack usage
stress test.
But really, just like DST iteration, we should probably make these
things more iterative.
The cool thing about loopback is that we have a trigger for the cases
we care about, release_sock().
So we could have something like:
1) lock_sock() sets "local cpu will run release_sock()" mark.
2) netif_rx() checks mark, if set it puts SKB on "release_sock()
local cpu work queue"
3) release_sock() retains mark, and runs SKB queue until empty.
Once SKB work queue is empty, mark is cleared.
Anyways, just an idea.
prev parent reply other threads:[~2010-10-28 20:08 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-10-28 19:48 [Just for fun] loopback: avoid softirq on most transmits Eric Dumazet
2010-10-28 20:09 ` David Miller [this message]
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=20101028.130917.179938102.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=eric.dumazet@gmail.com \
--cc=netdev@vger.kernel.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).