login
Header Space

 
 

Re: yield API

Score:
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Ingo Molnar <mingo@...>
Cc: David Schwartz <davids@...>, <linux-kernel@...>
Subject: Re: yield API
Date: Tuesday, October 2, 2007 - 7:50 am

On Tue, 2 Oct 2007, Ingo Molnar wrote:


But sched_yield() on Linux never did what the majority of
programmers assumed it would do (give up the CPU to some
runnable processes for the rest of the time-slice). Instead,
it just appeared to spin in the kernel. Therefore, those
who needed a sched_yield(), just used usleep().

Whether or not there is a POSIX definition of sched_yield(),
there is a need for something that will give up the CPU
and not busy-wait. There are many control applications
where state-machines are kept in user-mode code. The code
waits for an event. It shouldn't be spinning, wasting
CPU time, when the kernel can be doing file and network
I/O with the wasted CPU cycles.

So, just because sched_yield() doesn't work as expected,
is not the reason to get rid of it.

Cheers,
Dick Johnson
Penguin : Linux version 2.6.16.24 on an i686 machine (5592.59 BogoMips).
My book : http://www.AbominableFirebug.com/
_


****************************************************************
The information transmitted in this message is confidential and may be privileged.  Any review, retransmission, dissemination, or other use of this information by persons or entities other than the intended recipient is prohibited.  If you are not the intended recipient, please notify Analogic Corporation immediately - by replying to this message or by sending an email to DeliveryErrors@analogic.com - and destroy all copies of this information, including any attachments, without reading or disclosing them.

Thank you.
-
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

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