Merge branch 'sched/core' into cpus4096
Conflicts: include/linux/ftrace.h kernel/sched.c
This commit is contained in:
@ -220,8 +220,14 @@ build_up:
|
||||
*/
|
||||
while ((layers < (MAX_LEVEL - 1)) && (id >= (1 << (layers*IDR_BITS)))) {
|
||||
layers++;
|
||||
if (!p->count)
|
||||
if (!p->count) {
|
||||
/* special case: if the tree is currently empty,
|
||||
* then we grow the tree by moving the top node
|
||||
* upwards.
|
||||
*/
|
||||
p->layer++;
|
||||
continue;
|
||||
}
|
||||
if (!(new = get_from_free_list(idp))) {
|
||||
/*
|
||||
* The allocation failed. If we built part of
|
||||
|
@ -62,10 +62,7 @@ s64 __percpu_counter_sum(struct percpu_counter *fbc)
|
||||
for_each_online_cpu(cpu) {
|
||||
s32 *pcount = per_cpu_ptr(fbc->counters, cpu);
|
||||
ret += *pcount;
|
||||
*pcount = 0;
|
||||
}
|
||||
fbc->count = ret;
|
||||
|
||||
spin_unlock(&fbc->lock);
|
||||
return ret;
|
||||
}
|
||||
@ -104,13 +101,13 @@ void percpu_counter_destroy(struct percpu_counter *fbc)
|
||||
if (!fbc->counters)
|
||||
return;
|
||||
|
||||
free_percpu(fbc->counters);
|
||||
fbc->counters = NULL;
|
||||
#ifdef CONFIG_HOTPLUG_CPU
|
||||
mutex_lock(&percpu_counters_lock);
|
||||
list_del(&fbc->list);
|
||||
mutex_unlock(&percpu_counters_lock);
|
||||
#endif
|
||||
free_percpu(fbc->counters);
|
||||
fbc->counters = NULL;
|
||||
}
|
||||
EXPORT_SYMBOL(percpu_counter_destroy);
|
||||
|
||||
|
Reference in New Issue
Block a user