Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1759057AbZKYVa5 (ORCPT ); Wed, 25 Nov 2009 16:30:57 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1758981AbZKYVa5 (ORCPT ); Wed, 25 Nov 2009 16:30:57 -0500 Received: from mx1.redhat.com ([209.132.183.28]:4094 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754553AbZKYVa4 (ORCPT ); Wed, 25 Nov 2009 16:30:56 -0500 Message-ID: <4B0DA1D9.2030609@redhat.com> Date: Wed, 25 Nov 2009 16:30:01 -0500 From: Masami Hiramatsu User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.4pre) Gecko/20091014 Fedora/3.0-2.8.b4.fc11 Thunderbird/3.0b4 MIME-Version: 1.0 To: rostedt@goodmis.org CC: Frederic Weisbecker , Ingo Molnar , Ananth N Mavinakayanahalli , lkml , systemtap , DLE , Jim Keniston , Srikar Dronamraju , Christoph Hellwig , "H. Peter Anvin" , Anders Kaseorg , Tim Abbott , Andi Kleen , Jason Baron , Mathieu Desnoyers Subject: Re: [PATCH -tip v5 03/10] kprobes: Introduce kprobes jump optimization References: <20091123232115.22071.71558.stgit@dhcp-100-2-132.bos.redhat.com> <20091123232141.22071.53317.stgit@dhcp-100-2-132.bos.redhat.com> <20091124024417.GA6752@nowhere> <20091124033135.GE6752@nowhere> <4B0BFCF8.4060905@redhat.com> <20091124201357.GB5071@nowhere> <4B0C492D.1060602@redhat.com> <1259183331.21397.71.camel@gandalf.stny.rr.com> In-Reply-To: <1259183331.21397.71.camel@gandalf.stny.rr.com> Content-Type: text/plain; charset=ISO-2022-JP Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1380 Lines: 42 Steven Rostedt wrote: > On Tue, 2009-11-24 at 15:59 -0500, Masami Hiramatsu wrote: > >>> I see...so the non-preemptible kernel requirement looks >>> hard to workaround :-s >> >> It's the next challenge I think :-) >> Even though, kprobes itself still work on preemptive kernel, >> so we don't lose any functionality. > >> From kstop_machine, we could search all tasks to see if any are about to > resume in the modified location. If there is, we could either > > 1) insert a normal kprobe > 2) modify the return address of the task to jump to some trampoline to > finish the work and return to the code spot with a direct jump. > > #2 is kind of nasty but seems like a fun thing to implement ;-) Sure, anyway, a normal kprobe is already inserted, so we also can just wait until all tasks don't resume to the spot :-) (that's another reason why it uses delayed work for optimization. we can try it again and again.) And I think, that code will be shared with ksplice too. Thank you, -- Masami Hiramatsu Software Engineer Hitachi Computer Products (America), Inc. Software Solutions Division e-mail: mhiramat@redhat.com -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/