Messages in this thread Patch in this message | | | Subject | [patch] sched, cgroups: fix MIN_SHARES on 64 bit boxen | From | Mike Galbraith <> | Date | Sat, 04 Jun 2011 11:29:56 +0200 |
| |
c8b28116 claimed to have no user-visible effect, but allows setting cpu.shares to < MIN_SHARES, which the user then indeed sees.
Signed-off-by: Mike Galbraith <efault@gmx.de> --- kernel/sched.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Index: linux-2.6/kernel/sched.c =================================================================== --- linux-2.6.orig/kernel/sched.c +++ linux-2.6/kernel/sched.c @@ -292,7 +292,7 @@ static DEFINE_SPINLOCK(task_group_lock); * (The default weight is 1024 - so there's no practical * limitation from this.) */ -#define MIN_SHARES 2 +#define MIN_SHARES (scale_load(2)) #define MAX_SHARES (1UL << (18 + SCHED_LOAD_RESOLUTION)) static int root_task_group_load = ROOT_TASK_GROUP_LOAD;
| |