Re: [PATCH] poll: Avoid extra wakeups in select/poll

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Christoph Lameter <cl@...>
Cc: linux kernel <linux-kernel@...>, Andi Kleen <andi@...>, David Miller <davem@...>, <jesse.brandeburg@...>, <netdev@...>, <haoki@...>, <mchan@...>, <davidel@...>, Ingo Molnar <mingo@...>
Date: Tuesday, April 28, 2009 - 4:05 pm

Christoph Lameter a écrit :

But... udpping does *not* use poll() nor select(), unless I am mistaken ?

If you really want to test this patch with udpping, you might add a poll() call
before recvfrom() :

                while(1) {
+                       struct pollfd pfd = { .fd = sock, .events = POLLIN};
+                       poll(pfd, 1, -1);
                        nbytes = recvfrom(sock, msg, min(inblocksize, sizeof(msg)),
                                                                0, &inad, &inadlen);
                        if (nbytes < 0) {
                                perror("recvfrom");
                                break;
                        }
                        if (sendto(sock, msg, nbytes, 0, &inad, inadlen) < 0) {
                                perror("sendto");
                                break;
                        }
                }

Part about recvfrom() wakeup avoidance is in David net-2.6 tree, and saves 2 us on udpping here.

Is it what you call git2p1 ?



--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
udp ping pong with various process bindings (and correct cpu..., Christoph Lameter, (Fri Apr 24, 4:10 pm)
[PATCH] poll: Avoid extra wakeups, Eric Dumazet, (Sun Apr 26, 6:46 am)
Re: [PATCH] poll: Avoid extra wakeups, Andi Kleen, (Tue Apr 28, 10:21 am)
[PATCH] poll: Avoid extra wakeups in select/poll, Eric Dumazet, (Tue Apr 28, 11:06 am)
Re: [PATCH] poll: Avoid extra wakeups in select/poll, Ingo Molnar, (Wed Apr 29, 5:16 am)
Re: [PATCH] poll: Avoid extra wakeups in select/poll, Eric Dumazet, (Wed Apr 29, 5:36 am)
Re: [PATCH] poll: Avoid extra wakeups in select/poll, Ingo Molnar, (Wed Apr 29, 6:27 am)
Re: [PATCH] poll: Avoid extra wakeups in select/poll, Eric Dumazet, (Wed Apr 29, 8:29 am)
Re: [PATCH] poll: Avoid extra wakeups in select/poll, Davide Libenzi, (Wed Apr 29, 11:53 am)
Re: [PATCH] poll: Avoid extra wakeups in select/poll, Ingo Molnar, (Wed Apr 29, 9:07 am)
Re: [PATCH] poll: Avoid extra wakeups in select/poll, Andrew Morton, (Wed Apr 29, 3:20 am)
Re: [PATCH] poll: Avoid extra wakeups in select/poll, Eric Dumazet, (Wed Apr 29, 3:39 am)
Re: [PATCH] poll: Avoid extra wakeups in select/poll, Eric Dumazet, (Wed Apr 29, 4:26 am)
Re: [PATCH] poll: Avoid extra wakeups in select/poll, Andi Kleen, (Wed Apr 29, 3:35 am)
Re: [PATCH] poll: Avoid extra wakeups in select/poll, Ingo Molnar, (Wed Apr 29, 5:22 am)
Re: [PATCH] poll: Avoid extra wakeups in select/poll, Eric Dumazet, (Wed Apr 29, 3:37 am)
Re: [PATCH] poll: Avoid extra wakeups in select/poll, Christoph Lameter, (Tue Apr 28, 3:05 pm)
Re: [PATCH] poll: Avoid extra wakeups in select/poll, Eric Dumazet, (Tue Apr 28, 4:05 pm)
Re: [PATCH] poll: Avoid extra wakeups in select/poll, Christoph Lameter, (Tue Apr 28, 4:14 pm)
Re: [PATCH] poll: Avoid extra wakeups in select/poll, Eric Dumazet, (Tue Apr 28, 4:33 pm)
Re: [PATCH] poll: Avoid extra wakeups in select/poll, Christoph Lameter, (Tue Apr 28, 4:49 pm)
Re: [PATCH] poll: Avoid extra wakeups in select/poll, Eric Dumazet, (Tue Apr 28, 5:04 pm)
Re: [PATCH] poll: Avoid extra wakeups in select/poll, Eric Dumazet, (Tue Apr 28, 5:11 pm)
Re: [PATCH] poll: Avoid extra wakeups in select/poll, Ingo Molnar, (Wed Apr 29, 5:11 am)
Re: [PATCH] poll: Avoid extra wakeups in select/poll, Eric Dumazet, (Thu Apr 30, 6:49 am)
Re: [PATCH] poll: Avoid extra wakeups in select/poll, Ingo Molnar, (Thu Apr 30, 7:57 am)
Re: [PATCH] poll: Avoid extra wakeups in select/poll, Eric Dumazet, (Thu Apr 30, 10:08 am)
Re: [PATCH] poll: Avoid extra wakeups in select/poll, Paul E. McKenney, (Thu Apr 30, 5:24 pm)
[BUG] perf_counter: change cpu frequencies , Eric Dumazet, (Thu Apr 30, 12:07 pm)
Re: [BUG] perf_counter: change cpu frequencies, Eric Dumazet, (Sun May 3, 2:06 am)
Re: [BUG] perf_counter: change cpu frequencies, Ingo Molnar, (Sun May 3, 3:25 am)
Re: [BUG] perf_counter: change cpu frequencies, Eric Dumazet, (Mon May 4, 6:39 am)
Re: [PATCH] poll: Avoid extra wakeups in select/poll, Christoph Lameter, (Tue Apr 28, 5:00 pm)
Re: [PATCH] poll: Avoid extra wakeups in select/poll, Eric Dumazet, (Tue Apr 28, 5:05 pm)
Re: [PATCH] poll: Avoid extra wakeups in select/poll, Christoph Lameter, (Tue Apr 28, 5:04 pm)
Re: [PATCH] poll: Avoid extra wakeups, Eric Dumazet, (Tue Apr 28, 10:58 am)
Re: [PATCH] poll: Avoid extra wakeups, David Miller, (Tue Apr 28, 5:15 am)
Re: [PATCH] poll: Avoid extra wakeups, Eric Dumazet, (Tue Apr 28, 5:24 am)
Re: [PATCH] poll: Avoid extra wakeups, Jarek Poplawski, (Sun Apr 26, 9:33 am)
Re: [PATCH] poll: Avoid extra wakeups, Eric Dumazet, (Sun Apr 26, 10:27 am)