Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/percpu
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/percpu: (46 commits) powerpc64: convert to dynamic percpu allocator sparc64: use embedding percpu first chunk allocator percpu: kill lpage first chunk allocator x86,percpu: use embedding for 64bit NUMA and page for 32bit NUMA percpu: update embedding first chunk allocator to handle sparse units percpu: use group information to allocate vmap areas sparsely vmalloc: implement pcpu_get_vm_areas() vmalloc: separate out insert_vmalloc_vm() percpu: add chunk->base_addr percpu: add pcpu_unit_offsets[] percpu: introduce pcpu_alloc_info and pcpu_group_info percpu: move pcpu_lpage_build_unit_map() and pcpul_lpage_dump_cfg() upward percpu: add @align to pcpu_fc_alloc_fn_t percpu: make @dyn_size mandatory for pcpu_setup_first_chunk() percpu: drop @static_size from first chunk allocators percpu: generalize first chunk allocator selection percpu: build first chunk allocators selectively percpu: rename 4k first chunk allocator to page percpu: improve boot messages percpu: fix pcpu_reclaim() locking ... Fix trivial conflict as by Tejun Heo in kernel/sched.c
This commit is contained in:
+5
-5
@@ -146,7 +146,7 @@ enum arq_state {
|
||||
#define RQ_STATE(rq) ((enum arq_state)(rq)->elevator_private2)
|
||||
#define RQ_SET_STATE(rq, state) ((rq)->elevator_private2 = (void *) state)
|
||||
|
||||
static DEFINE_PER_CPU(unsigned long, ioc_count);
|
||||
static DEFINE_PER_CPU(unsigned long, as_ioc_count);
|
||||
static struct completion *ioc_gone;
|
||||
static DEFINE_SPINLOCK(ioc_gone_lock);
|
||||
|
||||
@@ -161,7 +161,7 @@ static void as_antic_stop(struct as_data *ad);
|
||||
static void free_as_io_context(struct as_io_context *aic)
|
||||
{
|
||||
kfree(aic);
|
||||
elv_ioc_count_dec(ioc_count);
|
||||
elv_ioc_count_dec(as_ioc_count);
|
||||
if (ioc_gone) {
|
||||
/*
|
||||
* AS scheduler is exiting, grab exit lock and check
|
||||
@@ -169,7 +169,7 @@ static void free_as_io_context(struct as_io_context *aic)
|
||||
* complete ioc_gone and set it back to NULL.
|
||||
*/
|
||||
spin_lock(&ioc_gone_lock);
|
||||
if (ioc_gone && !elv_ioc_count_read(ioc_count)) {
|
||||
if (ioc_gone && !elv_ioc_count_read(as_ioc_count)) {
|
||||
complete(ioc_gone);
|
||||
ioc_gone = NULL;
|
||||
}
|
||||
@@ -211,7 +211,7 @@ static struct as_io_context *alloc_as_io_context(void)
|
||||
ret->seek_total = 0;
|
||||
ret->seek_samples = 0;
|
||||
ret->seek_mean = 0;
|
||||
elv_ioc_count_inc(ioc_count);
|
||||
elv_ioc_count_inc(as_ioc_count);
|
||||
}
|
||||
|
||||
return ret;
|
||||
@@ -1507,7 +1507,7 @@ static void __exit as_exit(void)
|
||||
ioc_gone = &all_gone;
|
||||
/* ioc_gone's update must be visible before reading ioc_count */
|
||||
smp_wmb();
|
||||
if (elv_ioc_count_read(ioc_count))
|
||||
if (elv_ioc_count_read(as_ioc_count))
|
||||
wait_for_completion(&all_gone);
|
||||
synchronize_rcu();
|
||||
}
|
||||
|
||||
+5
-5
@@ -48,7 +48,7 @@ static int cfq_slice_idle = HZ / 125;
|
||||
static struct kmem_cache *cfq_pool;
|
||||
static struct kmem_cache *cfq_ioc_pool;
|
||||
|
||||
static DEFINE_PER_CPU(unsigned long, ioc_count);
|
||||
static DEFINE_PER_CPU(unsigned long, cfq_ioc_count);
|
||||
static struct completion *ioc_gone;
|
||||
static DEFINE_SPINLOCK(ioc_gone_lock);
|
||||
|
||||
@@ -1415,7 +1415,7 @@ static void cfq_cic_free_rcu(struct rcu_head *head)
|
||||
cic = container_of(head, struct cfq_io_context, rcu_head);
|
||||
|
||||
kmem_cache_free(cfq_ioc_pool, cic);
|
||||
elv_ioc_count_dec(ioc_count);
|
||||
elv_ioc_count_dec(cfq_ioc_count);
|
||||
|
||||
if (ioc_gone) {
|
||||
/*
|
||||
@@ -1424,7 +1424,7 @@ static void cfq_cic_free_rcu(struct rcu_head *head)
|
||||
* complete ioc_gone and set it back to NULL
|
||||
*/
|
||||
spin_lock(&ioc_gone_lock);
|
||||
if (ioc_gone && !elv_ioc_count_read(ioc_count)) {
|
||||
if (ioc_gone && !elv_ioc_count_read(cfq_ioc_count)) {
|
||||
complete(ioc_gone);
|
||||
ioc_gone = NULL;
|
||||
}
|
||||
@@ -1550,7 +1550,7 @@ cfq_alloc_io_context(struct cfq_data *cfqd, gfp_t gfp_mask)
|
||||
INIT_HLIST_NODE(&cic->cic_list);
|
||||
cic->dtor = cfq_free_io_context;
|
||||
cic->exit = cfq_exit_io_context;
|
||||
elv_ioc_count_inc(ioc_count);
|
||||
elv_ioc_count_inc(cfq_ioc_count);
|
||||
}
|
||||
|
||||
return cic;
|
||||
@@ -2654,7 +2654,7 @@ static void __exit cfq_exit(void)
|
||||
* this also protects us from entering cfq_slab_kill() with
|
||||
* pending RCU callbacks
|
||||
*/
|
||||
if (elv_ioc_count_read(ioc_count))
|
||||
if (elv_ioc_count_read(cfq_ioc_count))
|
||||
wait_for_completion(&all_gone);
|
||||
cfq_slab_kill();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user