lkml.org 
[lkml]   [2016]   [Jun]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] events/uprobes: move smp_read_barrier_depends() where needed
On 06/10, Andrea Parri wrote:
>
> On Fri, Jun 10, 2016 at 4:39 PM, Oleg Nesterov <oleg@redhat.com> wrote:
>
> > On 06/10, Oleg Nesterov wrote:
> > >
> > > On 06/10, Andrea Parri wrote:
> > > >
> > > > More simply/clean, as you said, maybe; one advantage of keeping
> > > > the "raw" smp_read_barrier_depends() in get_trampoline_vaddr() is
> > > > that we can avoid it when area is NULL;
> > >
> > > Do you really think it makes sense to optimize out read_barrier_depends
> > here?
> > >
> > > It can only be NULL in handle_swbp(), and in this case we are going to
> > do a
> > > lot of work, and in particular install this xol vma,
> >
> > Not to mention that alpha doesn't support uprobes, so this all is currently
> > cosmetic.
> >
>
> Do you mean a "cosmetic" improvement over the current version? ;-)

Yes, if you mean "turn smp_read_barrier_depends into lockless_dereference" ;)
So I will be happy to ack this patch if you make it.

But "optimize out smp_read_barrier_depends if NULL" imho makes no sense.

And, speaking of get_trampoline_vaddr() in particular, it is a bit ugly anyway.
prepare_uretprobe() can not hit area == NULL and doesn't need a barrier, while
handle_swbp() actually wants is_trampoline(bp_vaddr). Not that I really think
this needs a cleanup, at least until we change this code to use multiple
trampolines (say, for different stacks).

Oleg.

\
 
 \ /
  Last update: 2016-06-10 22:21    [W:0.806 / U:0.020 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site