[lkml]   [2007]   [Oct]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH -mm] slub: fix cpu hotplug offline/online path
On Thu, 11 Oct 2007, Akinobu Mita wrote:

> > Why would get_cpu_slab not work?
> case CPU_DEAD:
> down_read(&slub_lock);
> list_for_each_entry(s, &slab_caches, list) {
> struct kmem_cache_cpu *c = get_cpu_slab(s, cpu);
> local_irq_save(flags);
> __flush_cpu_slab(s, cpu);
> local_irq_restore(flags);
> free_kmem_cache_cpu(c, cpu);
> s->cpu_slab[cpu] = NULL; <----------------------
> }
> up_read(&slub_lock);
> break;
> When CPU is offlined, cpu-hotplug notifier sets s->cpu_slab[cpu] = NULL.
> This means get_cpu_slab() always return NULL when CPU is being onlined.
> So I can't use get_cpu_slab to check whether kmem_cache_cpu_free
> initalization for the CPU has already been done or not.

If you have set it to NULL then the earlier kmem_cache_cpu structures has
been freed. Why is it a problem to allocate another one when the cpu comes
up again?
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2007-10-11 18:49    [W:0.055 / U:1.320 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site