Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751178AbdI3FMV (ORCPT ); Sat, 30 Sep 2017 01:12:21 -0400 Received: from mail.kernel.org ([198.145.29.99]:42268 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750984AbdI3FMU (ORCPT ); Sat, 30 Sep 2017 01:12:20 -0400 DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 87F3721869 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=mhiramat@kernel.org Date: Fri, 29 Sep 2017 22:12:15 -0700 From: Masami Hiramatsu To: Ingo Molnar Cc: mingo@redhat.com, x86@kernel.org, Steven Rostedt , linux-kernel@vger.kernel.org, Peter Zijlstra , Ananth N Mavinakayanahalli , Thomas Gleixner , "H . Peter Anvin" , "Paul E . McKenney" , Alexei Starovoitov , Alexei Starovoitov Subject: Re: [PATCH -tip v3 7/7] kprobes: Use synchronize_rcu_tasks() for optprobe with CONFIG_PREEMPT Message-Id: <20170929221215.56948e64d2bb05858cf3d624@kernel.org> In-Reply-To: <20170929174527.ajbzh5jljaffh57x@gmail.com> References: <150581509713.32348.1905525476438163954.stgit@devbox> <150581537997.32348.14125457458719053753.stgit@devbox> <20170928072220.iv5subwl4u4zcqcp@gmail.com> <20170929002938.64cb852d6d921ec013d7f052@kernel.org> <20170929073755.ypjz6cidn7aiyxbq@gmail.com> <20170929074436.f447187d99e5e78008b15234@kernel.org> <20170929174527.ajbzh5jljaffh57x@gmail.com> X-Mailer: Sylpheed 3.5.0 (GTK+ 2.24.30; x86_64-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1829 Lines: 62 On Fri, 29 Sep 2017 19:45:28 +0200 Ingo Molnar wrote: > > * Masami Hiramatsu wrote: > > > On Fri, 29 Sep 2017 09:37:55 +0200 > > Ingo Molnar wrote: > > > > > > > > * Masami Hiramatsu wrote: > > > > > > > On Thu, 28 Sep 2017 09:22:20 +0200 > > > > Ingo Molnar wrote: > > > > > > > > > > > > > > * 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. > > > > > > > > > > This sentence does not parse. It's missing a verb, but I'm not sure. > > > > > > > > Hmm, how about this? > > > > > > > > Use synchthnize_rcu_tasks() to wait for all tasks preempted > > > > on trampoline code back on track so that jump optimized probe > > > > can be enabled with CONFIG_PREEMPT. > > > > > > What's "synchthnize"? ... > > > > Oops, it's my typo. my XPS touch pad is really unstable... > > > > > > > > More seriously, I still don't understand it. What is 'back on track'? > > > > > > Do you mean to say: > > > > > > We want to wait for all potentially preempted kprobes trampoline execution to > > > have completed. This guarantees that any freed trampoline memory is not in use > > > by any task in the system anymore. synchronize_rcu_tasks() gives such a > > > guarantee, so use it. > > > > Exactly, this is correct! > > Ok, great - please re-send the remaining kprobes patches that I have not applied > yet - I'll read through the changelogs and fix any bits that might still be > unclear. OK, I got it. I'll check the remaining patches! Thank you! > > Thanks, > > Ingo -- Masami Hiramatsu