[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.DEB.2.02.1402051324370.14325@chino.kir.corp.google.com>
Date: Wed, 5 Feb 2014 13:25:28 -0800 (PST)
From: David Rientjes <rientjes@...gle.com>
To: Steven Rostedt <rostedt@...dmis.org>
cc: Vladimir Davydov <vdavydov@...allels.com>,
akpm@...ux-foundation.org, penberg@...nel.org, cl@...ux.com,
linux-kernel@...r.kernel.org, a.p.zijlstra@...llo.nl
Subject: Re: [PATCH v3] slub: fix false-positive lockdep warning in
free_partial()
On Wed, 5 Feb 2014, Steven Rostedt wrote:
> Then add the comment that clears this up. But lets not add spinlocks
> just to quiet something if they truly are not needed.
>
> We use "__" variants all the time. That's really not extra code.
>
> Heck, if you want, call it remove_freed_partial() that shows that this
> version skips the check because it is freed.
>
> And if you don't want to have remove_freed_partial() being called by
> remove_partial() than still keep the "__" variant, add a
> "__always_inline" to it, and then do:
>
> static __always_inline
> __remove_partial(struct kmem_cache_node *n, struct page *page)
> {
> list_del(&page->lru);
> n->nr_partial--;
> }
>
> static inline remove_partial(struct kmem_cache_node *n,
> struct page *page)
> {
> lockdep_assert_held(&n->list_lock);
> __remove_partial(n, page);
> }
>
>
> static inline remove_freed_partial(struct kmem_cache_node *n,
> struct page *page)
> {
> __remove_partial(n, page);
> }
>
> The naming like this documents itself.
>
Looks like you've got something prepared already! Mind sending it to
Pekka as a patch based on linux-next?
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists