Re: [PATCH -mm] slub: fix cpu hotplug offline/online path

2007-10-11 Thread Christoph Lameter
On Thu, 11 Oct 2007, Akinobu Mita wrote: > This is another approach for the fix. Looks like the cleanest solution. Acked-by: Christoph Lameter <[EMAIL PROTECTED]> > Use cpumask to check whether kmem_cache_cpu_free initalization for > the CPU has already been done or not. > > --- > mm/slub.c

Re: [PATCH -mm] slub: fix cpu hotplug offline/online path

2007-10-11 Thread Christoph Lameter
On Fri, 12 Oct 2007, Akinobu Mita wrote: > > > 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 ea

Re: [PATCH -mm] slub: fix cpu hotplug offline/online path

2007-10-11 Thread Akinobu Mita
2007/10/12, Christoph Lameter <[EMAIL PROTECTED]>: > On Thu, 11 Oct 2007, Akinobu Mita wrote: > > > > Why would get_cpu_slab not work? > > > > > > case CPU_DEAD: > > case CPU_DEAD_FROZEN: > > down_read(&slub_lock); > > list_for_each_entry(s, &slab_cac

Re: [PATCH -mm] slub: fix cpu hotplug offline/online path

2007-10-11 Thread Christoph Lameter
On Thu, 11 Oct 2007, Akinobu Mita wrote: > > Why would get_cpu_slab not work? > > > case CPU_DEAD: > case CPU_DEAD_FROZEN: > down_read(&slub_lock); > list_for_each_entry(s, &slab_caches, list) { > struct kmem_cache_cpu *c =

Re: [PATCH -mm] slub: fix cpu hotplug offline/online path

2007-10-11 Thread Akinobu Mita
On Wed, Oct 10, 2007 at 10:39:32AM -0700, Christoph Lameter wrote: > On Wed, 10 Oct 2007, Akinobu Mita wrote: > > > I couldn't use get_cpu_slab() for that check. But I reviced the patch to do > > what you said. > > Why would get_cpu_slab not work? case CPU_DEAD: case CPU_DEAD_FR

Re: [PATCH -mm] slub: fix cpu hotplug offline/online path

2007-10-10 Thread Christoph Lameter
On Wed, 10 Oct 2007, Akinobu Mita wrote: > I couldn't use get_cpu_slab() for that check. But I reviced the patch to do > what you said. Why would get_cpu_slab not work? > + if (per_cpu(kmem_cache_cpu_free, cpu)) { > + /* Already initialized once */ > + return; > +

Re: [PATCH -mm] slub: fix cpu hotplug offline/online path

2007-10-10 Thread Akinobu Mita
On Tue, Oct 09, 2007 at 11:46:14AM -0700, Christoph Lameter wrote: > On Wed, 10 Oct 2007, Akinobu Mita wrote: > > > This patch removes init_alloc_cpu_cpu() from cpu hotplug notifier. But > > call it for each possible CPUs not only online CPUs at initialization time. > > Could you check if a per c

Re: [PATCH -mm] slub: fix cpu hotplug offline/online path

2007-10-09 Thread Christoph Lameter
On Tue, 9 Oct 2007, Pekka Enberg wrote: > Hi Christoph, > > On 10/9/07, Christoph Lameter <[EMAIL PROTECTED]> wrote: > > Our system come by default with the possibility of 1k cpus. However, a > > small system may only have 8 cpus. > > Maybe I am reading the code wrong, but I don't why that matte

Re: [PATCH -mm] slub: fix cpu hotplug offline/online path

2007-10-09 Thread Pekka Enberg
Hi Christoph, On 10/9/07, Christoph Lameter <[EMAIL PROTECTED]> wrote: > Our system come by default with the possibility of 1k cpus. However, a > small system may only have 8 cpus. Maybe I am reading the code wrong, but I don't why that matters as it's all statically allocated anyway (the per-cpu

Re: [PATCH -mm] slub: fix cpu hotplug offline/online path

2007-10-09 Thread Christoph Lameter
On Tue, 9 Oct 2007, Pekka Enberg wrote: > Hi Christoph, > > On 10/9/07, Christoph Lameter <[EMAIL PROTECTED]> wrote: > > Could you check if a per cpu structure has already been allocated and then > > simply skip the call to init? Otherwise we end up with lots of per cpu > > structures for cpus th

Re: [PATCH -mm] slub: fix cpu hotplug offline/online path

2007-10-09 Thread Pekka Enberg
Hi Christoph, On 10/9/07, Christoph Lameter <[EMAIL PROTECTED]> wrote: > Could you check if a per cpu structure has already been allocated and then > simply skip the call to init? Otherwise we end up with lots of per cpu > structures for cpus that will never show up. Does it matter? How? - To uns

Re: [PATCH -mm] slub: fix cpu hotplug offline/online path

2007-10-09 Thread Christoph Lameter
On Wed, 10 Oct 2007, Akinobu Mita wrote: > This patch removes init_alloc_cpu_cpu() from cpu hotplug notifier. But > call it for each possible CPUs not only online CPUs at initialization time. Could you check if a per cpu structure has already been allocated and then simply skip the call to init?

Re: [PATCH -mm] slub: fix cpu hotplug offline/online path

2007-10-09 Thread Pekka Enberg
Hi Akinobu, On 10/9/07, Akinobu Mita <[EMAIL PROTECTED]> wrote: > This is because init_alloc_cpu_cpu() is called every time when the CPU is > going to be onlined but init_alloc_cpu_cpu() is not intented to be called > twice or more for same CPU. Then it breaks kmem_cache_cpu_free list for > the CP