sched: fix/optimise some issues

From: Stephan Bärwolf
Date: Wed Jul 20 2011 - 09:44:18 EST


This is a multi-part message in MIME format.After reviewing the kernels processscheduler I have found three issues.
I am not 100% sure, but I think they are worth patching. (see attached
patch 0001 to 0003) - These patches are agains 3.0-rc7.


I also implemented an 128bit vruntime support:
Majorly on systems with many tasks and (for example) deep cgroups
(or increased NICE0_LOAD/ SCHED_LOAD_SCALE as in commit
c8b281161dfa4bb5d5be63fb036ce19347b88c63), a weighted timeslice
(unsigned long) can become very large (on x86_64) and consumes a
large part of the u64 vruntimes (per tick) when added.
This might lead to missscheduling because of overflows.

The patches (as single files or as a one file blockpatch) in the bz2-files
mainly intruduce code (and a Kconfig) to switch to a 128bit vruntime on
x86_64 (of course with a little overhead) or limiting a virtual timeslice.
These patches are also "tidying up" the code around vruntimes by
abstracting it into seperate files and types, which also makes further
coding
easier and simplifies debugging.
For example vruntimes are stored into sched_vruntime_t type instead u64
after patching.
Please see for your own (and excuse the direct export from my local git)...

The bz2-patches are working against 2.6.39.3.

Best regards, Stephan

--
Dipl.-Inf. Stephan Bärwolf
Ilmenau University of Technology, Integrated Communication Systems Group
Phone: +49 (0)3677 69 4130
Email: stephan.baerwolf@xxxxxxxxxxxxx,
Web: http://www.tu-ilmenau.de/iks

Attachment: vruntime128bitpatches_single.tar.bz2
Description: application/bzip

Attachment: vruntime128bitpatches_oneblock.bz2
Description: application/bzip