From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31278 invoked by alias); 25 Nov 2009 21:30:00 -0000 Received: (qmail 31269 invoked by uid 22791); 25 Nov 2009 21:30:00 -0000 X-SWARE-Spam-Status: No, hits=-2.5 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 25 Nov 2009 21:29:56 +0000 Received: from int-mx05.intmail.prod.int.phx2.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.18]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id nAPLTrM2026319 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Wed, 25 Nov 2009 16:29:53 -0500 Received: from [10.16.2.46] (dhcp-100-2-46.bos.redhat.com [10.16.2.46]) by int-mx05.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id nAPLTpFM031930; Wed, 25 Nov 2009 16:29:51 -0500 Message-ID: <4B0DA1D9.2030609@redhat.com> Date: Wed, 25 Nov 2009 21:30:00 -0000 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 X-IsSubscribed: yes Mailing-List: contact systemtap-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: systemtap-owner@sourceware.org X-SW-Source: 2009-q4/txt/msg00713.txt.bz2 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