From: Steven Rostedt <rostedt@goodmis.org>
To: David Rientjes <rientjes@google.com>
Cc: LKML <linux-kernel@vger.kernel.org>,
Pekka Enberg <penberg@kernel.org>,
Christoph Lameter <cl@linux.com>,
Andrew Morton <akpm@linux-foundation.org>,
Vladimir Davydov <vdavydov@parallels.com>,
Peter Zijlstra <peterz@infradead.org>
Subject: Re: [PATCH] slub: Do not assert not having lock in removing freed partial
Date: Wed, 5 Feb 2014 20:06:32 -0500 [thread overview]
Message-ID: <20140205200632.021dc613@gandalf.local.home> (raw)
In-Reply-To: <alpine.DEB.2.02.1402051644520.5159@chino.kir.corp.google.com>
On Wed, 5 Feb 2014 16:46:43 -0800 (PST)
David Rientjes <rientjes@google.com> wrote:
> > +/*
> > + * The difference between remove_partial and remove_freed_partial
> > + * is that remove_freed_partial happens only on a a freed slab
>
> Duplicate "a" there.
oops.
>
> > + * that should not have anyone accessing it, and thus does not
> > + * require the n->list_lock.
> > + */
> > +static inline void remove_freed_partial(struct kmem_cache_node *n,
> > + struct page *page)
> > +{
> > + __remove_partial(n, page);
> > }
> >
> > /*
> > @@ -3195,7 +3212,7 @@ static void free_partial(struct kmem_cac
> >
> > list_for_each_entry_safe(page, h, &n->partial, lru) {
> > if (!page->inuse) {
> > - remove_partial(n, page);
> > + remove_freed_partial(n, page);
> > discard_slab(s, page);
> > } else {
> > list_slab_objects(s, page,
>
> We'll want to do something similiar for the add_partial() called from
> early_kmem_cache_node_alloc(), right? It had the added n->list_lock for
> the same reason and is done during early init where nobody else can be
> referencing a kmem_cache_node.
>
> It would probably be better to define these in terms of "partial slabs
> that cannot have anyone else accessing it" rather than "freed slabs".
Perhaps then we just use the __remove_partial() and __add_partial()
that does not do the checks. That's common practice to use a "__" to
denote that it's special and usually doesn't require locking.
-- Steve
next prev parent reply other threads:[~2014-02-06 1:06 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-02-06 0:24 Steven Rostedt
2014-02-06 0:46 ` David Rientjes
2014-02-06 1:06 ` Steven Rostedt [this message]
2014-02-06 1:26 ` David Rientjes
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=20140205200632.021dc613@gandalf.local.home \
--to=rostedt@goodmis.org \
--cc=akpm@linux-foundation.org \
--cc=cl@linux.com \
--cc=linux-kernel@vger.kernel.org \
--cc=penberg@kernel.org \
--cc=peterz@infradead.org \
--cc=rientjes@google.com \
--cc=vdavydov@parallels.com \
/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®