lkml.org 
[lkml]   [1999]   [Oct]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] scheduler cleanup
Andrea Arcangeli wrote:
>
> I had a fast look at the patch and one thing looks obviously wrong:
>
> + * A thread calling sched_yield() wants to give up its timeslice and let
> + * other equal priority threads to run.
> + * We optimize by ignoring the request completely when the number of
> + * currently runnable processes is <= the number of available CPUs.
>
> You can't expect the other running tasks to reschedule idle CPUs as they
> may be very fast tasks that needs to run on your CPU as they don't want to
> trash the CPU cache. So you must _always_ reschedule if SCHED_YIELD is
> asked.

hmm, while the check certainly isn't necessary (it's supposed to help
in pathological situations when sys_sched_yield() is needlessly called,
and mainly reduce lock contention), i don't see the problem...


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

\
 
 \ /
  Last update: 2005-03-22 13:54    [W:0.055 / U:1.964 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site