]> pilppa.com Git - linux-2.6-omap-h63xx.git/commit
[PATCH] sched: improve efficiency of sched_fork()
authorPeter Williams <pwil3058@bigpond.net.au>
Tue, 19 Dec 2006 02:48:50 +0000 (12:48 +1000)
committerLinus Torvalds <torvalds@woody.osdl.org>
Thu, 21 Dec 2006 08:11:51 +0000 (00:11 -0800)
commitbc947631d1d532c758f8fcbdeb1f7fc2f4c863f8
tree3795bf4735650e4a1af417f7c97f1d7103401308
parent136f1e7a8cb7d17ff91706518549697071640ae4
[PATCH] sched: improve efficiency of sched_fork()

Problem:
  sched_fork() has always called scheduler_tick() in some (unlikely)
  circumstances in order to update the current task in light of those
  circumstances.  It has always been the case that the work done by
  scheduler_tick() was more than was required to handle the problem in
  hand but no harm was done except for the waste of a few CPU cycles.

  However, the splitting of scheduler_tick() into two procedures in
  2.6.20-rc1 enables the wasted cycles to be saved as the new procedure
  task_running_tick() does all the work that is required to rectify the
  problem being handled.

Solution:
  Replace the call to scheduler_tick() in sched_fork() with a call to
  task_running_tick().

Signed-off-by: Peter Williams <pwil3058@bigpond.com.au>
Acked-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
kernel/sched.c