[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20170118221737.GP5238@linux.vnet.ibm.com>
Date: Wed, 18 Jan 2017 14:17:37 -0800
From: "Paul E. McKenney" <paulmck@...ux.vnet.ibm.com>
To: willy@...radead.org
Cc: linux-kernel@...r.kernel.org, linux-mm@...ck.org, cl@...ux.com,
penberg@...nel.org, rientjes@...gle.com, iamjoonsoo.kim@....com,
akpm@...ux-foundation.org
Subject: Re: [PATCH RFC] mm: Rename SLAB_DESTROY_BY_RCU to
SLAB_TYPESAFE_BY_RCU
On Wed, Jan 18, 2017 at 03:12:01AM -0800, willy@...radead.org wrote:
> On Wed, Jan 18, 2017 at 03:07:32AM -0800, Paul E. McKenney wrote:
> > A group of Linux kernel hackers reported chasing a bug that resulted
> > from their assumption that SLAB_DESTROY_BY_RCU provided an existence
> > guarantee, that is, that no block from such a slab would be reallocated
> > during an RCU read-side critical section. Of course, that is not the
> > case. Instead, SLAB_DESTROY_BY_RCU only prevents freeing of an entire
> > slab of blocks.
> >
> > However, there is a phrase for this, namely "type safety". This commit
> > therefore renames SLAB_DESTROY_BY_RCU to SLAB_TYPESAFE_BY_RCU in order
> > to avoid future instances of this sort of confusion.
>
> This is probably the ultimate in bikeshedding, but RCU is not the
> thing which is providing the typesafety. Slab is providing the
> typesafety in order to help RCU. So would a better name not be
> 'SLAB_TYPESAFETY_FOR_RCU', or more succinctly 'SLAB_RCU_TYPESAFE'?
Actually, slab is using RCU to provide type safety to those slab users
who request it.
Thanx, Paul
Powered by blists - more mailing lists