lkml.org 
[lkml]   [2011]   [Jun]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Subject[patch] sched, cgroups: fix MIN_SHARES on 64 bit boxen
From
Date

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;



\
 
 \ /
  Last update: 2011-06-04 11:33    [W:0.073 / U:0.204 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site