diff options
author | James Morris <jmorris@namei.org> | 2008-12-04 01:16:36 -0500 |
---|---|---|
committer | James Morris <jmorris@namei.org> | 2008-12-04 01:16:36 -0500 |
commit | ec98ce480ada787f2cfbd696980ff3564415505b (patch) | |
tree | 1a4d644b38f9f1e4b4e086fde0b195df4a92cf84 /kernel/sched.c | |
parent | 3496f92beb9aa99ef21fccc154a36c7698e9c538 (diff) | |
parent | feaf3848a813a106f163013af6fcf6c4bfec92d9 (diff) |
Merge branch 'master' into next
Conflicts:
fs/nfsd/nfs4recover.c
Manually fixed above to use new creds API functions, e.g.
nfs4_save_creds().
Signed-off-by: James Morris <jmorris@namei.org>
Diffstat (limited to 'kernel/sched.c')
-rw-r--r-- | kernel/sched.c | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/kernel/sched.c b/kernel/sched.c index 204d0662b438..993bc74a290c 100644 --- a/kernel/sched.c +++ b/kernel/sched.c | |||
@@ -1455,9 +1455,10 @@ static int task_hot(struct task_struct *p, u64 now, struct sched_domain *sd); | |||
1455 | static unsigned long cpu_avg_load_per_task(int cpu) | 1455 | static unsigned long cpu_avg_load_per_task(int cpu) |
1456 | { | 1456 | { |
1457 | struct rq *rq = cpu_rq(cpu); | 1457 | struct rq *rq = cpu_rq(cpu); |
1458 | unsigned long nr_running = ACCESS_ONCE(rq->nr_running); | ||
1458 | 1459 | ||
1459 | if (rq->nr_running) | 1460 | if (nr_running) |
1460 | rq->avg_load_per_task = rq->load.weight / rq->nr_running; | 1461 | rq->avg_load_per_task = rq->load.weight / nr_running; |
1461 | else | 1462 | else |
1462 | rq->avg_load_per_task = 0; | 1463 | rq->avg_load_per_task = 0; |
1463 | 1464 | ||
@@ -7805,13 +7806,14 @@ static int dattrs_equal(struct sched_domain_attr *cur, int idx_cur, | |||
7805 | * | 7806 | * |
7806 | * The passed in 'doms_new' should be kmalloc'd. This routine takes | 7807 | * The passed in 'doms_new' should be kmalloc'd. This routine takes |
7807 | * ownership of it and will kfree it when done with it. If the caller | 7808 | * ownership of it and will kfree it when done with it. If the caller |
7808 | * failed the kmalloc call, then it can pass in doms_new == NULL, | 7809 | * failed the kmalloc call, then it can pass in doms_new == NULL && |
7809 | * and partition_sched_domains() will fallback to the single partition | 7810 | * ndoms_new == 1, and partition_sched_domains() will fallback to |
7810 | * 'fallback_doms', it also forces the domains to be rebuilt. | 7811 | * the single partition 'fallback_doms', it also forces the domains |
7812 | * to be rebuilt. | ||
7811 | * | 7813 | * |
7812 | * If doms_new==NULL it will be replaced with cpu_online_map. | 7814 | * If doms_new == NULL it will be replaced with cpu_online_map. |
7813 | * ndoms_new==0 is a special case for destroying existing domains. | 7815 | * ndoms_new == 0 is a special case for destroying existing domains, |
7814 | * It will not create the default domain. | 7816 | * and it will not create the default domain. |
7815 | * | 7817 | * |
7816 | * Call with hotplug lock held | 7818 | * Call with hotplug lock held |
7817 | */ | 7819 | */ |