From: "Gregory Haskins" <ghaskins@novell.com>
To: "Herbert Xu" <herbert@gondor.apana.org.au>
Cc: <davem@davemloft.net>, "Patrick Mullaney" <PMullaney@novell.com>,
<netdev@vger.kernel.org>
Subject: Re: [PATCH] net/core/sock.c remove extra wakeup
Date: Sun, 15 Jun 2008 21:48:12 -0600 [thread overview]
Message-ID: <4855AA3C.BA47.005A.0@novell.com> (raw)
In-Reply-To: <E1K6K60-00061s-00@gondolin.me.apana.org.au>
>>> On Wed, Jun 11, 2008 at 2:46 AM, in message
<E1K6K60-00061s-00@gondolin.me.apana.org.au>, Herbert Xu
<herbert@gondor.apana.org.au> wrote:
> Gregory Haskins <GHaskins@novell.com> wrote:
>>
>> So basically it was waiting for a packet to arrive, and the net-rx softirq
> would first trigger a NOSPACE wakeup (of which was a noop by the udp-rx code)
> followed by an rx-wakeup. So the netperf thread woke twice for one packet.
> Fixing this boosted performance by a large margin (don't recall exact figures
> off the top of my head....somewhere around 20%)
>
> Please wrap your lines.
Apologies. I don't think I have control over it in my corporate mailer environment :( but if I can figure out a way to do it I will make this change. You are not the first to complain ;)
>
> Anyway, you've lost me with this scenario. The patch is stopping
> wake-ups on the write path yet you're talking about the read path.
> So my question is why are you getting the extra wake-up on that
> write path when you receive a packet?
Heh..you tell me :)
I don't recall the specifics off the top of my head, but IIRC it had to do with the fact that we were running a tx/rx netperf test and the way tx-completions are handled in the stack w.r.t. the softirqs.
The tx-completions code is executing inside the softirq-net-rx context and is freeing up the transmitted skbs. The problem is that it is blindly signaling the wait-queue that there was now SPACE (even though no-one cared about that event at the moment...the only waiter was waiting on an rx event).
So one way to look at it is the problem is that the single wait-queue serves both rx-wakeup, and tx-nospace events. Rather than open the can of worms of splitting the wait-queues into finer granularity, Pat chose to at least make the overloaded use of the single wait-queue more intelligent to know if anyone cared about the NOSPACE event or not.
>From my perspective, I don't care how the issue is specifically solved...I would ultimately just like to see this wasted wake-up "go away" one way or the other. ;) It significantly degrades performance (at least in this synthetic test) and as far as I can tell there is no reason to structure the code this way. If we are mistaken in that assessment, please let me know.
If we can offer any more details (such as the specific codepath that triggers the NOSPACE wakeup, for instance) we would be happy to oblige. Long story short this is easily repeatable.
Regards,
-Greg
next prev parent reply other threads:[~2008-06-16 3:48 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <483F99090200005A00037FFE@sinclair.provo.novell.com>
2008-05-30 10:05 ` [PATCH] net/core/sock.c remove extra wakeup Gregory Haskins
2008-06-11 6:46 ` Herbert Xu
2008-06-11 9:16 ` Killing sk->sk_callback_lock (was Re: [PATCH] net/core/sock.c remove extra wakeup) David Miller
2008-06-12 14:05 ` Herbert Xu
2008-06-16 3:48 ` Gregory Haskins [this message]
[not found] <483F99090200005A00037FFE@lucius.provo.novell.com>
[not found] ` <483F990C0200005A00038001@lucius.provo.novell.com>
2008-05-30 17:00 ` [PATCH] net/core/sock.c remove extra wakeup Patrick Mullaney
2008-06-01 21:03 ` Andi Kleen
2008-05-29 16:08 Patrick Mullaney
2008-05-30 9:52 ` 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=4855AA3C.BA47.005A.0@novell.com \
--to=ghaskins@novell.com \
--cc=PMullaney@novell.com \
--cc=davem@davemloft.net \
--cc=herbert@gondor.apana.org.au \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.