RE: Network slowdown due to CFS

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: David Schwartz
Date: Tuesday, October 2, 2007 - 8:37 am

This is a combined response to Arjan's:


And Ingo's:


So now I not only have to come up with an example where sched_yield is the
best practical choice, I have to come up with one where sched_yield is the
best conceivable choice? Didn't we start out by agreeing these are very rare
cases? Why are we designing new APIs for them (Arjan) and why do we care
about their performance (Ingo)?

These are *rare* cases. It is a waste of time to optimize them.

In this case, nobody cares about fairness to the service thread. It is a
cleanup task that probably runs every few minutes. It could be delayed for
minutes and nobody would care. What they do care about is the impact of the
service thread on the threads doing real work.

You two challenged me to present any legitimate use case for sched_yield. I
see now that was not a legitimate challenge and you two were determined to
shoot down any response no matter how reasonable on the grounds that there
is some way to do it better, no matter how complex, impractical, or
unjustified by the real-world problem.

I think if a pthread_mutex had a 'yield to others blocking on this mutex'
kind of a 'go to the back of the line' option, that would cover the majority
of cases where sched_yield is your best choice currently. Unfortunately,
POSIX gave us yield.

Note that I think we all agree that any program whose performance relies on
quirks of sched_yield (such as the examples that have been cited as CFS
'regressions') are broken horribly. None of the cases I am suggesting use
sched_yield as anything more than a minor optimization.

DS


-
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Network slowdown due to CFS, Martin Michlmayr, (Wed Sep 26, 1:52 am)
Re: Network slowdown due to CFS, Ingo Molnar, (Wed Sep 26, 2:34 am)
Re: Network slowdown due to CFS, Ingo Molnar, (Wed Sep 26, 2:47 am)
Re: Network slowdown due to CFS, Martin Michlmayr, (Wed Sep 26, 3:08 am)
Re: Network slowdown due to CFS, Ingo Molnar, (Wed Sep 26, 3:18 am)
Re: Network slowdown due to CFS, Mike Galbraith, (Wed Sep 26, 3:20 am)
Re: Network slowdown due to CFS, Mike Galbraith, (Wed Sep 26, 3:23 am)
Re: Network slowdown due to CFS, Martin Michlmayr, (Wed Sep 26, 3:48 am)
Re: Network slowdown due to CFS, Ingo Molnar, (Wed Sep 26, 4:21 am)
Re: Network slowdown due to CFS, Martin Michlmayr, (Wed Sep 26, 4:29 am)
RE: Network slowdown due to CFS, David Schwartz, (Wed Sep 26, 5:00 am)
Re: Network slowdown due to CFS, Ingo Molnar, (Wed Sep 26, 6:31 am)
Re: Network slowdown due to CFS, Stephen Hemminger, (Wed Sep 26, 8:40 am)
Re: Network slowdown due to CFS, Stephen Hemminger, (Wed Sep 26, 8:46 am)
Re: Network slowdown due to CFS, Jarek Poplawski, (Thu Sep 27, 2:30 am)
Re: Network slowdown due to CFS, Ingo Molnar, (Thu Sep 27, 2:46 am)
Re: Network slowdown due to CFS, Ingo Molnar, (Thu Sep 27, 2:49 am)
Re: Network slowdown due to CFS, Martin Michlmayr, (Thu Sep 27, 3:54 am)
Re: Network slowdown due to CFS, Ingo Molnar, (Thu Sep 27, 3:56 am)
Re: Network slowdown due to CFS, Martin Michlmayr, (Thu Sep 27, 4:12 am)
Re: Network slowdown due to CFS, Jarek Poplawski, (Thu Sep 27, 5:27 am)
Re: Network slowdown due to CFS, Ingo Molnar, (Thu Sep 27, 6:31 am)
Re: Network slowdown due to CFS, Jarek Poplawski, (Thu Sep 27, 7:42 am)
Re: Network slowdown due to CFS, Nick Piggin, (Thu Sep 27, 11:10 pm)
Re: Network slowdown due to CFS, Jarek Poplawski, (Mon Oct 1, 1:43 am)
Re: Network slowdown due to CFS, Ingo Molnar, (Mon Oct 1, 9:25 am)
RE: Network slowdown due to CFS, David Schwartz, (Mon Oct 1, 9:49 am)
Re: Network slowdown due to CFS, Chris Friesen, (Mon Oct 1, 9:55 am)
Re: Network slowdown due to CFS, Ingo Molnar, (Mon Oct 1, 10:09 am)
Re: Network slowdown due to CFS, Ingo Molnar, (Mon Oct 1, 10:31 am)
Re: Network slowdown due to CFS, Chris Friesen, (Mon Oct 1, 10:45 am)
RE: Network slowdown due to CFS, David Schwartz, (Mon Oct 1, 11:23 am)
Re: iperf yield usage, Ingo Molnar, (Mon Oct 1, 12:09 pm)
Re: Network slowdown due to CFS, Arjan van de Ven, (Mon Oct 1, 12:53 pm)
RE: Network slowdown due to CFS, David Schwartz, (Mon Oct 1, 3:17 pm)
Re: Network slowdown due to CFS, Arjan van de Ven, (Mon Oct 1, 3:35 pm)
RE: Network slowdown due to CFS, David Schwartz, (Mon Oct 1, 3:44 pm)
Re: Network slowdown due to CFS, Arjan van de Ven, (Mon Oct 1, 3:55 pm)
Re: Network slowdown due to CFS, Ingo Molnar, (Mon Oct 1, 11:06 pm)
Re: Network slowdown due to CFS, Ingo Molnar, (Mon Oct 1, 11:08 pm)
Re: Network slowdown due to CFS, Ingo Molnar, (Mon Oct 1, 11:26 pm)
Re: yield API, Ingo Molnar, (Mon Oct 1, 11:46 pm)
Re: Network slowdown due to CFS, Andi Kleen, (Mon Oct 1, 11:47 pm)
Re: Network slowdown due to CFS, Jarek Poplawski, (Tue Oct 2, 2:03 am)
Re: Network slowdown due to CFS, Jarek Poplawski, (Tue Oct 2, 2:26 am)
Re: yield API, linux-os (Dick Johnson), (Tue Oct 2, 4:50 am)
Re: Network slowdown due to CFS, Jarek Poplawski, (Tue Oct 2, 6:39 am)
Re: yield API, Douglas McNaught, (Tue Oct 2, 8:24 am)
RE: Network slowdown due to CFS, David Schwartz, (Tue Oct 2, 8:37 am)
Re: yield API, Eric St-Laurent, (Tue Oct 2, 2:57 pm)
Re: Network slowdown due to CFS, Jarek Poplawski, (Wed Oct 3, 12:15 am)
Re: Network slowdown due to CFS, Jarek Poplawski, (Wed Oct 3, 1:02 am)
Re: Network slowdown due to CFS, Ingo Molnar, (Wed Oct 3, 1:16 am)
Re: Network slowdown due to CFS, Jarek Poplawski, (Wed Oct 3, 1:56 am)
Re: Network slowdown due to CFS, Ingo Molnar, (Wed Oct 3, 2:10 am)
Re: Network slowdown due to CFS, Jarek Poplawski, (Wed Oct 3, 2:50 am)
Re: Network slowdown due to CFS, Dmitry Adamushko, (Wed Oct 3, 3:55 am)
Re: Network slowdown due to CFS, Dmitry Adamushko, (Wed Oct 3, 3:58 am)
Re: Network slowdown due to CFS, Jarek Poplawski, (Wed Oct 3, 4:20 am)
Re: Network slowdown due to CFS, Ingo Molnar, (Wed Oct 3, 4:22 am)
Re: Network slowdown due to CFS, Helge Hafting, (Wed Oct 3, 4:31 am)
Re: Network slowdown due to CFS, Jarek Poplawski, (Wed Oct 3, 4:40 am)
Re: yield, Ingo Molnar, (Wed Oct 3, 4:56 am)
Re: yield, Jarek Poplawski, (Wed Oct 3, 5:16 am)
RE: Network slowdown due to CFS, Rusty Russell, (Wed Oct 3, 5:31 pm)
Re: Network slowdown due to CFS, Casey Dahlin, (Wed Oct 3, 10:33 pm)
Re: Network slowdown due to CFS, Ingo Molnar, (Sun Oct 7, 12:18 am)
Re: yield API, Kyle Moffett, (Wed Dec 12, 9:43 pm)
RE: yield API, David Schwartz, (Thu Dec 13, 1:10 pm)