Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=b77d69db9f4ba03b2ed17e383c2d73ca89f5ab14 Commit: b77d69db9f4ba03b2ed17e383c2d73ca89f5ab14 Parent: 7109c4429af3640f79a638f177fc5d05b9807149 Author: Ingo Molnar <[EMAIL PROTECTED]> AuthorDate: Tue Aug 28 12:53:24 2007 +0200 Committer: Ingo Molnar <[EMAIL PROTECTED]> CommitDate: Tue Aug 28 12:53:24 2007 +0200
sched: fix wait_start_fair condition in update_stats_wait_end() Peter Zijlstra noticed the following bug in SCHED_FEAT_SKIP_INITIAL (which is disabled by default at the moment): it relies on se.wait_start_fair being 0 while update_stats_wait_end() did not recognize a 0 value, so instead of 'skipping' the initial interval we gave the new child a maximum boost of +runtime-limit ... (No impact on the default kernel, but nice to fix for completeness.) Signed-off-by: Ingo Molnar <[EMAIL PROTECTED]> Signed-off-by: Peter Zijlstra <[EMAIL PROTECTED]> Signed-off-by: Mike Galbraith <[EMAIL PROTECTED]> --- kernel/sched_fair.c | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/kernel/sched_fair.c b/kernel/sched_fair.c index 9f06094..0c71885 100644 --- a/kernel/sched_fair.c +++ b/kernel/sched_fair.c @@ -489,6 +489,9 @@ update_stats_wait_end(struct cfs_rq *cfs_rq, struct sched_entity *se) { unsigned long delta_fair; + if (unlikely(!se->wait_start_fair)) + return; + delta_fair = (unsigned long)min((u64)(2*sysctl_sched_runtime_limit), (u64)(cfs_rq->fair_clock - se->wait_start_fair)); - To unsubscribe from this list: send the line "unsubscribe git-commits-head" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html