From: "Akinobu Mita" <akinobu.mita@gmail.com>
To: "Christoph Lameter" <clameter@sgi.com>
Cc: linux-kernel@vger.kernel.org,
"Andrew Morton" <akpm@linux-foundation.org>,
"Pekka Enberg" <penberg@cs.helsinki.fi>
Subject: Re: [PATCH -mm] slub: fix cpu hotplug offline/online path
Date: Fri, 12 Oct 2007 02:24:13 +0900 [thread overview]
Message-ID: <961aa3350710111024jbcfd3e3q959bdb2d3c2828fe@mail.gmail.com> (raw)
In-Reply-To: <Pine.LNX.4.64.0710110944270.31423@schroedinger.engr.sgi.com>
2007/10/12, Christoph Lameter <clameter@sgi.com>:
> 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 = 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?
>
kmem_cache_cpu_free per-cpu singly list will be broken by calling
init_alloc_cpu_cpu() twice. It happens when online/offlining CPU.
All three patches I send attempt to make init_alloc_cpu_cpu()
called only once for each cpu.
next prev parent reply other threads:[~2007-10-11 17:24 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-10-09 16:13 Akinobu Mita
2007-10-09 17:41 ` Pekka Enberg
2007-10-09 18:46 ` Christoph Lameter
2007-10-09 18:48 ` Pekka Enberg
2007-10-09 18:50 ` Christoph Lameter
2007-10-09 19:02 ` Pekka Enberg
2007-10-09 19:15 ` Christoph Lameter
2007-10-10 12:18 ` Akinobu Mita
2007-10-10 17:39 ` Christoph Lameter
2007-10-11 14:36 ` Akinobu Mita
2007-10-11 16:46 ` Christoph Lameter
2007-10-11 17:24 ` Akinobu Mita [this message]
2007-10-11 17:36 ` Christoph Lameter
2007-10-11 17:37 ` Christoph Lameter
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=961aa3350710111024jbcfd3e3q959bdb2d3c2828fe@mail.gmail.com \
--to=akinobu.mita@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=clameter@sgi.com \
--cc=linux-kernel@vger.kernel.org \
--cc=penberg@cs.helsinki.fi \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®