Re: [RFC PATCH tip/master] kprobes: Use synchronize_rcu_tasks() for optprobe wit CONFIG_PREEMPT

2017-05-26 Thread Paul E. McKenney
On Fri, May 26, 2017 at 08:10:25AM +0200, Ingo Molnar wrote: > > * Paul E. McKenney wrote: > > > How about the following (untested) patch? > > Looks good to me! > > Acked-by: Ingo Molnar Very good, I have applied Masami's Reviewed-by and your

Re: [RFC PATCH tip/master] kprobes: Use synchronize_rcu_tasks() for optprobe wit CONFIG_PREEMPT

2017-05-26 Thread Paul E. McKenney
On Fri, May 26, 2017 at 08:10:25AM +0200, Ingo Molnar wrote: > > * Paul E. McKenney wrote: > > > How about the following (untested) patch? > > Looks good to me! > > Acked-by: Ingo Molnar Very good, I have applied Masami's Reviewed-by and your Acked-by, thank you both!

Re: [RFC PATCH tip/master] kprobes: Use synchronize_rcu_tasks() for optprobe wit CONFIG_PREEMPT

2017-05-26 Thread Ingo Molnar
* Paul E. McKenney wrote: > How about the following (untested) patch? Looks good to me! Acked-by: Ingo Molnar Thanks, Ingo

Re: [RFC PATCH tip/master] kprobes: Use synchronize_rcu_tasks() for optprobe wit CONFIG_PREEMPT

2017-05-26 Thread Ingo Molnar
* Paul E. McKenney wrote: > How about the following (untested) patch? Looks good to me! Acked-by: Ingo Molnar Thanks, Ingo

Re: [RFC PATCH tip/master] kprobes: Use synchronize_rcu_tasks() for optprobe wit CONFIG_PREEMPT

2017-05-25 Thread Masami Hiramatsu
On Thu, 25 May 2017 08:14:01 -0700 "Paul E. McKenney" wrote: > On Thu, May 25, 2017 at 08:15:55AM +0200, Ingo Molnar wrote: > > > > * Masami Hiramatsu wrote: > > > > > --- a/kernel/kprobes.c > > > +++ b/kernel/kprobes.c > > > @@ -377,6 +377,23

Re: [RFC PATCH tip/master] kprobes: Use synchronize_rcu_tasks() for optprobe wit CONFIG_PREEMPT

2017-05-25 Thread Masami Hiramatsu
On Thu, 25 May 2017 08:14:01 -0700 "Paul E. McKenney" wrote: > On Thu, May 25, 2017 at 08:15:55AM +0200, Ingo Molnar wrote: > > > > * Masami Hiramatsu wrote: > > > > > --- a/kernel/kprobes.c > > > +++ b/kernel/kprobes.c > > > @@ -377,6 +377,23 @@ static inline void copy_kprobe(struct kprobe

Re: [RFC PATCH tip/master] kprobes: Use synchronize_rcu_tasks() for optprobe wit CONFIG_PREEMPT

2017-05-25 Thread Paul E. McKenney
On Thu, May 25, 2017 at 08:15:55AM +0200, Ingo Molnar wrote: > > * Masami Hiramatsu wrote: > > > --- a/kernel/kprobes.c > > +++ b/kernel/kprobes.c > > @@ -377,6 +377,23 @@ static inline void copy_kprobe(struct kprobe *ap, > > struct kprobe *p) > > static bool

Re: [RFC PATCH tip/master] kprobes: Use synchronize_rcu_tasks() for optprobe wit CONFIG_PREEMPT

2017-05-25 Thread Paul E. McKenney
On Thu, May 25, 2017 at 08:15:55AM +0200, Ingo Molnar wrote: > > * Masami Hiramatsu wrote: > > > --- a/kernel/kprobes.c > > +++ b/kernel/kprobes.c > > @@ -377,6 +377,23 @@ static inline void copy_kprobe(struct kprobe *ap, > > struct kprobe *p) > > static bool kprobes_allow_optimization; > >

Re: [RFC PATCH tip/master] kprobes: Use synchronize_rcu_tasks() for optprobe wit CONFIG_PREEMPT

2017-05-25 Thread Masami Hiramatsu
On Thu, 25 May 2017 08:15:55 +0200 Ingo Molnar wrote: > > * Masami Hiramatsu wrote: > > > --- a/kernel/kprobes.c > > +++ b/kernel/kprobes.c > > @@ -377,6 +377,23 @@ static inline void copy_kprobe(struct kprobe *ap, > > struct kprobe *p) > > static bool

Re: [RFC PATCH tip/master] kprobes: Use synchronize_rcu_tasks() for optprobe wit CONFIG_PREEMPT

2017-05-25 Thread Masami Hiramatsu
On Thu, 25 May 2017 08:15:55 +0200 Ingo Molnar wrote: > > * Masami Hiramatsu wrote: > > > --- a/kernel/kprobes.c > > +++ b/kernel/kprobes.c > > @@ -377,6 +377,23 @@ static inline void copy_kprobe(struct kprobe *ap, > > struct kprobe *p) > > static bool kprobes_allow_optimization; > > > >

Re: [RFC PATCH tip/master] kprobes: Use synchronize_rcu_tasks() for optprobe wit CONFIG_PREEMPT

2017-05-25 Thread Ingo Molnar
* Masami Hiramatsu wrote: > --- a/kernel/kprobes.c > +++ b/kernel/kprobes.c > @@ -377,6 +377,23 @@ static inline void copy_kprobe(struct kprobe *ap, struct > kprobe *p) > static bool kprobes_allow_optimization; > > /* > + * Synchronizing wait on trampline code for

Re: [RFC PATCH tip/master] kprobes: Use synchronize_rcu_tasks() for optprobe wit CONFIG_PREEMPT

2017-05-25 Thread Ingo Molnar
* Masami Hiramatsu wrote: > --- a/kernel/kprobes.c > +++ b/kernel/kprobes.c > @@ -377,6 +377,23 @@ static inline void copy_kprobe(struct kprobe *ap, struct > kprobe *p) > static bool kprobes_allow_optimization; > > /* > + * Synchronizing wait on trampline code for interrupted

Re: [RFC PATCH tip/master] kprobes: Use synchronize_rcu_tasks() for optprobe wit CONFIG_PREEMPT

2017-05-24 Thread Paul E. McKenney
On Wed, May 24, 2017 at 09:00:03PM +0900, Masami Hiramatsu wrote: > To enable jump optimized probe with CONFIG_PREEMPT, use > synchronize_rcu_tasks() to wait for all tasks preempted > on trampoline code back on track. > > Since the jump optimized kprobes can replace multiple > instructions, there

Re: [RFC PATCH tip/master] kprobes: Use synchronize_rcu_tasks() for optprobe wit CONFIG_PREEMPT

2017-05-24 Thread Paul E. McKenney
On Wed, May 24, 2017 at 09:00:03PM +0900, Masami Hiramatsu wrote: > To enable jump optimized probe with CONFIG_PREEMPT, use > synchronize_rcu_tasks() to wait for all tasks preempted > on trampoline code back on track. > > Since the jump optimized kprobes can replace multiple > instructions, there