[lkml]   [2014]   [Feb]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: Memory allocator semantics
On Tue, Feb 11, 2014 at 12:43:35PM -0600, Christoph Lameter wrote:
> On Tue, 11 Feb 2014, Pekka Enberg wrote:
> > So again, there's nothing in (A) that the memory allocator is
> > concerned about. kmalloc() makes no guarantees whatsoever about the
> > visibility of "r1" across CPUs. If you're saying that there's an
> > implicit barrier between kmalloc() and kfree(), that's an unintended
> > side-effect, not a design decision AFAICT.
> I am not sure that this side effect necessarily happens. The SLUB fastpath
> does not disable interrupts and only uses a cmpxchg without lock
> semantics.

That tells me what I need to know. Users should definitely not try a
"drive-by kfree()" of something that was concurrently allocated. ;-)

Thanx, Paul

 \ /
  Last update: 2014-02-14 19:21    [W:0.048 / U:1.912 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site