From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1759430AbZCBSoi (ORCPT ); Mon, 2 Mar 2009 13:44:38 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1756887AbZCBSoY (ORCPT ); Mon, 2 Mar 2009 13:44:24 -0500 Received: from smtp1.linux-foundation.org ([140.211.169.13]:57148 "EHLO smtp1.linux-foundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755679AbZCBSoX (ORCPT ); Mon, 2 Mar 2009 13:44:23 -0500 Date: Mon, 2 Mar 2009 10:42:21 -0800 (PST) From: Linus Torvalds X-X-Sender: torvalds@localhost.localdomain To: Arjan van de Ven cc: Masami Hiramatsu , Mathieu Desnoyers , Ingo Molnar , Andrew Morton , Nick Piggin , Steven Rostedt , Andi Kleen , linux-kernel@vger.kernel.org, Thomas Gleixner , Peter Zijlstra , Frederic Weisbecker , Rusty Russell , "H. Peter Anvin" , Steven Rostedt Subject: Re: [RFC][PATCH] x86: make text_poke() atomic In-Reply-To: <20090302102841.7e099670@infradead.org> Message-ID: References: <20090223154258.GB28727@Krystal> <20090223161312.GA30279@Krystal> <20090223173108.GB1441@Krystal> <49A82851.5080707@redhat.com> <20090227180724.GA17947@Krystal> <49A83237.40604@redhat.com> <20090227185316.GA19811@Krystal> <49A853CD.3020607@redhat.com> <49AC10E9.1090102@redhat.com> <20090302102841.7e099670@infradead.org> User-Agent: Alpine 2.00 (LFD 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 On Mon, 2 Mar 2009, Arjan van de Ven wrote: > > .... but text_poke() realistically needs to call stop_machine() since > you can't poke live code.... so that makes me wonder how useful this > is... Well, not always. There's at least two cases where we don't need it: - in the UP -> SMP transition. - perhaps more interestingly, we're still kind of waiting for the resolution of the whole "nop out the first byte to a single-byte 'irq3' trap instruction, then rewrite the rest of the instruction, and then reset the first byte of the final instruction" thing. IOW, there are possible non-stop_machine() models where rewriting instructions in a live system does work, and quite frankly, I think we need them. Making the rule be the (obviously safe) "we can only do this in stop_machine" is quite possibly not going to be an acceptable rule and we may need alternatives. Linus