diff options
author | Peter Zijlstra <a.p.zijlstra@chello.nl> | 2012-04-26 13:12:27 +0200 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2012-05-09 15:00:49 +0200 |
commit | c82513e513556a04f81aa511cd890acd23349c48 (patch) | |
tree | dbccd379fffd75cd87513e4dd0e91ac597628382 /kernel/sched/fair.c | |
parent | ad7687dde8780a0d618a3e3b5a62bb383696fc22 (diff) | |
download | talos-obmc-linux-c82513e513556a04f81aa511cd890acd23349c48.tar.gz talos-obmc-linux-c82513e513556a04f81aa511cd890acd23349c48.zip |
sched: Change rq->nr_running to unsigned int
Since there's a PID space limit of 30bits (see
futex.h:FUTEX_TID_MASK) and allocating that many tasks (assuming a
lower bound of 2 pages per task) would still take 8T of memory it
seems reasonable to say that unsigned int is sufficient for
rq->nr_running.
When we do get anywhere near that amount of tasks I suspect other
things would go funny, load-balancer load computations would really
need to be hoisted to 128bit etc.
So save a few bytes and convert rq->nr_running and friends to
unsigned int.
Suggested-by: Ingo Molnar <mingo@kernel.org>
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Link: http://lkml.kernel.org/n/tip-y3tvyszjdmbibade5bw8zl81@git.kernel.org
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'kernel/sched/fair.c')
-rw-r--r-- | kernel/sched/fair.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c index e9553640c1c3..678966ca393b 100644 --- a/kernel/sched/fair.c +++ b/kernel/sched/fair.c @@ -4447,10 +4447,10 @@ redo: * correctly treated as an imbalance. */ env.flags |= LBF_ALL_PINNED; - env.load_move = imbalance; - env.src_cpu = busiest->cpu; - env.src_rq = busiest; - env.loop_max = min_t(unsigned long, sysctl_sched_nr_migrate, busiest->nr_running); + env.load_move = imbalance; + env.src_cpu = busiest->cpu; + env.src_rq = busiest; + env.loop_max = min(sysctl_sched_nr_migrate, busiest->nr_running); more_balance: local_irq_save(flags); |