Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755288Ab3GKAEf (ORCPT ); Wed, 10 Jul 2013 20:04:35 -0400 Received: from cantor2.suse.de ([195.135.220.15]:51162 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754457Ab3GKAEe (ORCPT ); Wed, 10 Jul 2013 20:04:34 -0400 Date: Thu, 11 Jul 2013 02:04:27 +0200 (CEST) From: Jiri Kosina To: Jason Baron Cc: Masami Hiramatsu , Steven Rostedt , "H. Peter Anvin" , "linux-kernel@vger.kernel.org" , mathieu.desnoyers@efficios.com Subject: Re: [RFC] [PATCH 0/2] x86: make jump labels use int3-based breakpoint instead of stop_machine() In-Reply-To: <51DDDFB3.3020004@akamai.com> Message-ID: References: <51DDDFB3.3020004@akamai.com> User-Agent: Alpine 2.00 (LNX 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1988 Lines: 51 On Wed, 10 Jul 2013, Jason Baron wrote: > > this is a resurrection of a few years old idea to have jump labels use > > synchronization based on int3 breakpoint rather than relying on > > stop_machine() with all the consequences. > > > > ftrace has been doing exactly this kind of patching for year since > > 08d636b6 ("ftrace/x86: Have arch x86_64 use breakpoints instead of stop > > machine"). > > > > This patchset first introduces generic text_poke_bp() that provides means > > to perform this method of patching in parallel to text_poke_smp(), and > > then converts x86 jump label code to use it. > > > > If this is merged, I'll do a followup patch converting ftrace to use this > > infrastructure as well, as it's doing the same thing in principle already. > > > > Comments welcome. > > > > Cool. This definitely an area I've wanted to improve with jump labels. > > Perhaps, ftrace should be considered at this point to make sure the > interface is suitable for both callers? Yeah, Steven is CCed. From my understanding of the code, ftrace is actually doing exactly what I have done for jump labels in 2/2, i.e. in case the breakpoint is triggered, ftrace implicitly behaves like if "nop" was the instruction that has been executed. I even have preliminary (completely untested) patch, but would like to have this merged/acked in the first round before proceeding with porting ftrace to the new interface. > Also, I wonder if its worth batching up updates. For example, right now > we simply update each call-site one at a time even if its associated > with the same control variable. That does seem to make sense indeed, but it's not really closely tied to this patchset, is it? Thanks, -- Jiri Kosina SUSE Labs -- 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/