linux-uconsole/include
Peter Zijlstra 54a2695e9f sched: Remove the cfs_rq dependency from set_task_cpu()
commit 88ec22d3ed upstream

In order to remove the cfs_rq dependency from set_task_cpu() we
need to ensure the task is cfs_rq invariant for all callsites.

The simple approach is to substract cfs_rq->min_vruntime from
se->vruntime on dequeue, and add cfs_rq->min_vruntime on
enqueue.

However, this has the downside of breaking FAIR_SLEEPERS since
we loose the old vruntime as we only maintain the relative
position.

To solve this, we observe that we only migrate runnable tasks,
we do this using deactivate_task(.sleep=0) and
activate_task(.wakeup=0), therefore we can restrain the
min_vruntime invariance to that state.

The only other case is wakeup balancing, since we want to
maintain the old vruntime we cannot make it relative on dequeue,
but since we don't migrate inactive tasks, we can do so right
before we activate it again.

This is where we need the new pre-wakeup hook, we need to call
this while still holding the old rq->lock. We could fold it into
->select_task_rq(), but since that has multiple callsites and
would obfuscate the locking requirements, that seems like a
fudge.

This leaves the fork() case, simply make sure that ->task_fork()
leaves the ->vruntime in a relative state.

This covers all cases where set_task_cpu() gets called, and
ensures it sees a relative vruntime.

Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Mike Galbraith <efault@gmx.de>
LKML-Reference: <20091216170518.191697025@chello.nl>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Mike Galbraith <efault@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-09-20 13:18:02 -07:00
..
acpi ACPI: skip checking BM_STS if the BIOS doesn't ask for it 2010-08-02 10:21:24 -07:00
asm-generic dma-mapping: fix dma_sync_single_range_* 2010-05-26 14:29:14 -07:00
crypto Merge git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 2009-09-11 09:38:37 -07:00
drm drm/radeon/kms: add FireMV 2400 PCI ID. 2010-04-26 07:41:26 -07:00
keys RxRPC: Use uX/sX rather than uintX_t/intX_t types 2009-09-16 00:01:13 -07:00
linux sched: Remove the cfs_rq dependency from set_task_cpu() 2010-09-20 13:18:02 -07:00
math-emu math-emu: correct test for downshifting fraction in _FP_FROM_INT() 2010-08-02 10:20:44 -07:00
media V4L/DVB (13019): video: initial support for ADV7180 2009-09-19 00:53:39 -03:00
mtd
net sctp: Fix skb_over_panic resulting from multiple invalid parameter errors (CVE-2010-1173) (v4) 2010-07-05 11:11:14 -07:00
pcmcia PM / yenta: Split resume into early and late parts (rev. 4) 2009-11-03 10:54:58 +01:00
rdma trivial: fix typo "to to" in multiple files 2009-09-21 15:14:55 +02:00
rxrpc
scsi SCSI: fc-transport: Use packed modifier for fc_bsg_request structure. 2010-04-26 07:41:30 -07:00
sound ALSA: emu10k1 - delay the PCM interrupts (add pcm_irq_delay parameter) 2010-08-26 16:41:34 -07:00
trace tracing: Fix ftrace_event_call alignment for use with gcc 4.5 2010-05-12 14:57:14 -07:00
video davinci-fb-frame-buffer-driver-for-ti-da8xx-omap-l1xx-v4 2009-09-23 07:39:51 -07:00
xen
Kbuild