All of lore.kernel.org
 help / color / mirror / Atom feed
From: Oleg Nesterov <oleg@redhat.com>
To: Andrea Parri <parri.andrea@gmail.com>
Cc: Peter Zijlstra <peterz@infradead.org>,
	LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] events/uprobes: move smp_read_barrier_depends() where needed
Date: Fri, 10 Jun 2016 21:36:52 +0200	[thread overview]
Message-ID: <20160610193652.GA14622@redhat.com> (raw)
In-Reply-To: <CAPZ9YJYPynX2vGgFarhiyUN0GF--h6r2kbhJ4pRt2NMY1qCODg@mail.gmail.com>

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.

  parent reply	other threads:[~2016-06-10 19:36 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-09 18:18 [PATCH] events/uprobes: move smp_read_barrier_depends() where needed Andrea Parri
2016-06-10  7:03 ` Oleg Nesterov
2016-06-10 12:26   ` Oleg Nesterov
     [not found]     ` <CAPZ9YJY_6mB797YRG4=byTbz6WTH91GZjba9zDQhZ+J0C-khSg@mail.gmail.com>
2016-06-10 13:07       ` Oleg Nesterov
2016-06-10 14:39         ` Oleg Nesterov
     [not found]           ` <CAPZ9YJYPynX2vGgFarhiyUN0GF--h6r2kbhJ4pRt2NMY1qCODg@mail.gmail.com>
2016-06-10 19:36             ` Oleg Nesterov [this message]
     [not found]   ` <CAPZ9YJaxdqpCh9DyD7ubrTEhCL9jEdMzNN6zJHsOPYGN5NNPXg@mail.gmail.com>
2016-06-10 12:59     ` Oleg Nesterov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160610193652.GA14622@redhat.com \
    --to=oleg@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=parri.andrea@gmail.com \
    --cc=peterz@infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.