Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1419367

Re: [PATCH] events/uprobes: move smp_read_barrier_depends() where needed

From Oleg Nesterov <oleg@redhat.com>
Newsgroups linux.kernel
Subject Re: [PATCH] events/uprobes: move smp_read_barrier_depends() where needed
Date 2016-06-10 15:00 +0200
Message-ID <rIucz-4Ga-49@gated-at.bofh.it> (permalink)
References <rIcIF-1zJ-1@gated-at.bofh.it> <rIoJP-1vU-21@gated-at.bofh.it> <rIucz-4Ga-51@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On 06/10, Andrea Parri wrote:
>
> On Fri, Jun 10, 2016 at 9:03 AM, Oleg Nesterov <oleg@redhat.com> wrote:
>
> > On 06/09, Andrea Parri wrote:
> > >
> > > There is no need to use the barrier if there is no dereference/
> > > memory access; move it where needed (currently, affecting only
> > > Alpha).
> >
> > OK, although area == NULL is unlikely case,
> >
> > > While touching this, also make the reads _ONCE().
> >
> > Why? both xol_area/vaddr can't change.
> >
>
> This is to ensure current (and future) compiler transformations
> won't optimize out or reorder the reads (do not ask me how ...,
> IAC the volatile casts will prevent this to happen).
>
> AFAICT, xol_area can be "== NULL" and "!= NULL" ...

Yes, but it can't change if it is not NULL. So we do not care if gcc
reads xol_area/vaddr twice or reorderes this with other LOADs.

Oleg.

Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread


Thread

[PATCH] events/uprobes: move smp_read_barrier_depends() where needed Andrea Parri <parri.andrea@gmail.com> - 2016-06-09 20:20 +0200
  Re: [PATCH] events/uprobes: move smp_read_barrier_depends() where  needed Oleg Nesterov <oleg@redhat.com> - 2016-06-10 09:10 +0200
    Re: [PATCH] events/uprobes: move smp_read_barrier_depends() where  needed Oleg Nesterov <oleg@redhat.com> - 2016-06-10 14:30 +0200
      Re: [PATCH] events/uprobes: move smp_read_barrier_depends() where  needed Oleg Nesterov <oleg@redhat.com> - 2016-06-10 15:10 +0200
        Re: [PATCH] events/uprobes: move smp_read_barrier_depends() where  needed Oleg Nesterov <oleg@redhat.com> - 2016-06-10 16:50 +0200
          Re: [PATCH] events/uprobes: move smp_read_barrier_depends() where  needed Oleg Nesterov <oleg@redhat.com> - 2016-06-10 21:40 +0200
    Re: [PATCH] events/uprobes: move smp_read_barrier_depends() where  needed Oleg Nesterov <oleg@redhat.com> - 2016-06-10 15:00 +0200

csiph-web