[lkml]   [2019]   [Sep]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH 04/11] General notification queue with user mmap()'able ring buffer [ver #7]
Hillf Danton <> wrote:

> > + smp_store_release(&buf->meta.head, head);
> Add a line of comment for the paring smp_load_acquire().
> I did not find it in 04/11.

You won't find smp_load_acquire() - it's not in the kernel, though if you look
in the sample, you'll find the corresponding barrier in userspace. Note that
there's a further implicit barrier you don't see.

I've added the comments:

/* Barrier against userspace, ordering data read before tail read */
ring_tail = READ_ONCE(buf->meta.tail);


/* Barrier against userspace, ordering head update after data write. */
smp_store_release(&buf->meta.head, head);


 \ /
  Last update: 2019-09-03 18:07    [W:0.187 / U:1.492 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site