* Christoph Hellwig <[email protected]> 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
might_sleep().
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
think.
(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.
Ingo
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[Index of Archives]
[Kernel Newbies]
[Netfilter]
[Bugtraq]
[Photo]
[Stuff]
[Gimp]
[Yosemite News]
[MIPS Linux]
[ARM Linux]
[Linux Security]
[Linux RAID]
[Video 4 Linux]
[Linux for the blind]
[Linux Resources]