Re: iperf yield usage




* Chris Friesen <cfriesen@xxxxxxxxxx> wrote:

See the background and answers to that in:

http://lkml.org/lkml/2007/9/19/357
http://lkml.org/lkml/2007/9/19/328

there's plenty of recourse possible to all possible kinds of apps.
Tune the sysctl flag in one direction or another, depending on which
behavior the app is expecting.

Yeah, I read those threads.

It seems like the fundamental source of the disconnect is that the
tasks used to be sorted by priority (thus making it easy to bump a
yielding task to the end of that priority level) while now they're
organized by time (making it harder to do anything priority-based).
Do I have that right?

not really - the old yield implementation in essence gave the task a
time hit too, because we rotated through tasks based on timeslices. But
the old one requeued yield-ing tasks to the 'active array', and the
decision whether a task is in the active or in the expired array was a
totally stohastic, load-dependent thing. As a result, certain tasks,
under certain workloads saw a "stronger" yield, other tasks saw a
"weaker" yield. (The reason for that implementation was simple: yield
was (and is) unimportant and it was implemented in the most
straightforward way that caused no overhead anywhere else in the
scheduler.)

( and to keep perspective it's also important to correct the subject
line here: it's not about "network slowdown" - nothing in networking
slowed down in any way - it was that iperf used yield in a horrible
way. I changed the subject line to reflect that. )

Ingo
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



Relevant Pages

  • Re: Re:without message queue
    ... " It is understandable that, at some certain point, your thread has to yield ... the CPU, so that some other thread gets a chance to run". ... Your real-time priority thread voluntarily yields the CPU by entering ... Meanwhile, some other real-time priority thread starts running, and does not ...
    (microsoft.public.win32.programmer.kernel)
  • Re: Dont really understand Thread.yield()
    ... > if a thead calls yield()? ... moved to the end of its priority ... so the new currently running thread is selected among ... If there are other threads with the same priority as the yielding ...
    (comp.lang.java.programmer)
  • Re: Network slowdown due to CFS
    ... cannot afford to wait for the lock to be released. ... it calls yield before re-acquiring them to go back to work. ... and it will introduce random latencies into apps using ... used scheduler functionalities, so it does not really matter. ...
    (Linux-Kernel)
  • Re: wait vs. yield?
    ... how that platform schedules threads. ... way to use yield() and get the same effect on multiple platforms. ... hope that all threads with priority equal to T1's will get a chance ... Pthreads has yieldanalogs. ...
    (comp.lang.java.programmer)
  • Re: CFS: some bad numbers with Java/database threading [FIXED]
    ... Compared with more kernels here - a bit more cluttered: ... Subject: sched: yield workaround ... Some apps that mistakenly rely on sched_yield ... the use of this sysctl might generate ...
    (Linux-Kernel)