From: "H. Peter Anvin" Subject: Re: [PATCH 1/1] x86: fix text_poke Date: Fri, 25 Apr 2008 09:42:26 -0700 Message-ID: <481209F2.4050908@zytor.com> References: <20080425.021301.193689806.davem@davemloft.net> <1209343883-7991-1-git-send-email-jirislaby@gmail.com> <20080425151931.GA25510@elte.hu> <20080425152650.GA894@elte.hu> <20080425154854.GC3265@one.firstfloor.org> <20080425161916.GD3265@one.firstfloor.org> <20080425163035.GE9503@Krystal> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Andi Kleen , Linus Torvalds , Ingo Molnar , Jiri Slaby , David Miller , zdenek.kabelac@gmail.com, rjw@sisk.pl, paulmck@linux.vnet.ibm.com, akpm@linux-foundation.org, linux-ext4@vger.kernel.org, herbert@gondor.apana.org.au, penberg@cs.helsinki.fi, clameter@sgi.com, linux-kernel@vger.kernel.org, pageexec@freemail.hu, Jeremy Fitzhardinge To: Mathieu Desnoyers Return-path: Received: from terminus.zytor.com ([198.137.202.10]:59377 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1763150AbYDYQrV (ORCPT ); Fri, 25 Apr 2008 12:47:21 -0400 In-Reply-To: <20080425163035.GE9503@Krystal> Sender: linux-ext4-owner@vger.kernel.org List-ID: Mathieu Desnoyers wrote: > > Yes, the immediate values, in general, only need to do atomic writes, > because I have taken care of placing the mov instruction in the correct > alignment so its immediate value happens to be aligned in memory. > However, the latest optimisation I did to change a conditional branch > into a jump when the correct code pattern is detected : > > mov, test, bne short > into a > nop2, nop2, nop1, jmp short > > or > > mov, test, bne near > into a > nop2, nop2, nop1, jmp near > And how, pray tell, do you deal with the fact that: a) the EFLAGS may be live on exit; b) there might be a jump into the middle of this instruction sequence? -hpa