[lkml]   [2005]   [May]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectRe: [patch] Voluntary Kernel Preemption, 2.6.12-rc4-mm2

    * Christoph Hellwig <> wrote:

    > I still disagree with this one violently. [...]

    (then you must be disagreeing with CONFIG_PREEMPT too to a certain
    degree i guess?)

    > [...] If you want a cond_resched() add it where nessecary, but don't
    > hide it behind might_sleep - there could be quite a lot might_sleeps
    > in common codepathes and they should stay purely a debug aid.

    The recent prolifation of might_sleep() points was a direct result of
    the -VP patch. I _did_ measure and lay out the might_sleep()s so that
    key latency paths get cut. If we did what you propose we'd end up
    duplicating 95% of the current might_sleep() invocations. So instead of
    sprinking the source with cond_resched()s, we implicitly get them via

    there's another argument as well: if a function truly might sleep, it's
    in most cases complex enough to not worry about one extra need_resched()
    check. So might_sleep() and cond_resched() pair better than one would

    (it is also a debugging helper: by actually sleeping at might_sleep()
    points we truly explore whether preemption at that point is safe.)

    or if you think we can get away with using just a couple of
    cond_resched()s then you are my guest to prove me wrong: take the -RT
    kernel it has both -VP and the latency measurement tools integrated, and
    remove the cond_resched() from might_sleep() and try to find the points
    that are necessary to cut down latencies so that they fall into the
    1msec range on typical hw.

    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-05-24 17:14    [W:0.026 / U:17.932 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site