[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20090428.022602.99712872.davem@davemloft.net>
Date: Tue, 28 Apr 2009 02:26:02 -0700 (PDT)
From: David Miller <davem@...emloft.net>
To: dada1@...mosbay.com
Cc: cl@...ux.com, jesse.brandeburg@...el.com, netdev@...r.kernel.org,
haoki@...hat.com, mchan@...adcom.com, davidel@...ilserver.org
Subject: Re: [PATCH] net: Avoid extra wakeups of threads blocked in
wait_for_packet()
From: Eric Dumazet <dada1@...mosbay.com>
Date: Sat, 25 Apr 2009 17:47:23 +0200
> In 2.6.25 we added UDP mem accounting.
>
> This unfortunatly added a penalty when a frame is transmitted, since
> we have at TX completion time to call sock_wfree() to perform necessary
> memory accounting. This calls sock_def_write_space() and utimately
> scheduler if any thread is waiting on the socket.
> Thread(s) waiting for an incoming frame was scheduled, then had to sleep
> again as event was meaningless.
...
> This patch introduces new DEFINE_WAIT_FUNC() helper and uses it
> in wait_for_packet(), so that only relevant event can wakeup a thread
> blocked in this function.
Ok, I was going to give some time towards considering the
alternative implementation of using 2 wait queues and what
it would look like.
It didn't take long for me to figure out that this is so much
simpler that it's not even worth trying the dual wait queue
approach.
So I've applied this to net-2.6, thanks!
Now, if we want to fix this up in -stable we'll need to scratch
our heads if we can't get the keyed wakeup patch in too. :-/
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists