[lkml]   [2001]   [Apr]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectRe: #define HZ 1024 -- negative effects?
    On Fri, 27 Apr 2001, Mike Galbraith wrote:
    > > Rubbish. Whenever a higher-priority thread than the current
    > > thread becomes runnable the current thread will get preempted,
    > > regardless of whether its timeslices is over or not.
    > What about SCHED_YIELD and allocating during vm stress times?
    > Say you have only two tasks. One is the gui and is allocating,
    > the other is a pure compute task. The compute task doesn't do
    > anything which will cause preemtion except use up it's slice.
    > The gui may yield the cpu but the compute job never will.
    > (The gui won't _become_ runnable if that matters. It's marked
    > as running, has yielded it's remaining slice and went to sleep..
    > with it's eyes open;)

    A well-written GUI should not be using SCHED_YIELD. If it is
    "allocating", anything, it won't be using SCHED_YIELD or be marked
    runnable, it will be blocked, waiting until the resource becomes
    available. When that happens, it will preempt the compute task (if its
    priority is high enough, which is very likely - and can be assured if
    it's running at a real-time priority as I suggested earlier).

    Nigel Gamble
    Mountain View, CA, USA.

    MontaVista Software

    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to
    More majordomo info at
    Please read the FAQ at

     \ /
      Last update: 2005-03-22 12:52    [W:0.020 / U:0.660 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site