Re: [RFC][PATCH v2] slub: Keep page and object in sync in
slab_alloc_node()
[Posted January 23, 2013 by corbet]
From: |
| Steven Rostedt <rostedt-AT-goodmis.org> |
To: |
| Christoph Lameter <cl-AT-linux.com> |
Subject: |
| Re: [RFC][PATCH v2] slub: Keep page and object in sync in
slab_alloc_node() |
Date: |
| Fri, 18 Jan 2013 10:55:01 -0500 |
Message-ID: |
| <1358524501.7383.17.camel@gandalf.local.home> |
Cc: |
| LKML <linux-kernel-AT-vger.kernel.org>, linux-mm <linux-mm-AT-kvack.org>,
Andrew Morton <akpm-AT-linux-foundation.org>, Pekka Enberg
<penberg-AT-kernel.org>, Matt Mackall <mpm-AT-selenic.com>, Thomas Gleixner
<tglx-AT-linutronix.de>, RT <linux-rt-users-AT-vger.kernel.org>, Clark Williams
<clark-AT-redhat.com>, John Kacur <jkacur-AT-gmail.com>, "Luis Claudio R.
Goncalves" <lgoncalv-AT-redhat.com> |
Archive‑link: | |
Article |
On Fri, 2013-01-18 at 10:04 -0500, Steven Rostedt wrote:
Just to be more complete:
> CPU0 CPU1
> ---- ----
c = __this_cpu_ptr(s->cpu_slab);
<migrates to CPU0>
> <cpu fetches c->page>
<another task>
> updates c->tid
> updates c->page
> updates c->freelist
> <cpu fetches c->tid>
> <cpu fetches c->freelist>
>
> node_match() succeeds even though
> current c->page wont
>
<migrates back to CPU 1>
> this_cpu_cmpxchg_double() only tests
> the object (freelist) and tid, both which
> will match, but the page that was tested
> isn't the right one.
>
Yes, it's very unlikely, but we are in the business of dealing with the
very unlikely. That's because in our business, the very unlikely is very
likely. Damn, I need to buy a lotto ticket!
-- Steve
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>