]> git.hungrycats.org Git - linux/commit
[PATCH] O21 for interactivity 2.6.0
authorAndrew Morton <akpm@osdl.org>
Mon, 19 Jan 2004 02:30:03 +0000 (18:30 -0800)
committerLinus Torvalds <torvalds@home.osdl.org>
Mon, 19 Jan 2004 02:30:03 +0000 (18:30 -0800)
commit8c6f4906c0e0b0229967551a9ddafd8685f1c563
treee18f5d2de4c0ff4785d35350341001324ccec0b8
parentf6ef9d5b50bb879c0d2ebc2b305568669a9fb958
[PATCH] O21 for interactivity 2.6.0

From: Con Kolivas <kernel@kolivas.org>

A non-critical corner case has come up for interactivity that I believe needs
to be addressed. It is only extensive testing and examination that revealed
this, as this interactivity work is in maintenance mode.

Description:

  It is possible for a highly interactive task (like X) to cause large
  latencies in tasks that are less 'niced' (eg negative nice number
  compared to X which should normally run at nice 0) if they are fully
  cpu bound.  This occurs due to expiration of the cpu bound tasks.

  This patch addresses this by not reinserting interactive tasks into
  the active array if there is a better static priority task running but
  has been placed on the expired array.  This causes a substantial
  reduction in the maximum scheduling latency a task with a less nice
  value can have.

  This also has the positive side effect of maintaining better cpu%
  proportions for tasks of different nice levels.

Testers will only be able to discern a difference with highly cpu bound tasks
of normal scheduling policy at different nice levels. Test cases are doing
something cpu intensive relatively -niced in the presence of an interactive
load (eg capturing and encoding video at nice -10 while using X nice 0, or
something nice 0 vs nice +10) and so on. Because of the crossover of 10
'nice' levels of dynamic priorities between interactive and cpu bound tasks
this patch will have a more noticable effect as the nice difference is
greater, especially 11 or more.
kernel/sched.c