Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757316AbYHNSqH (ORCPT ); Thu, 14 Aug 2008 14:46:07 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752923AbYHNSpz (ORCPT ); Thu, 14 Aug 2008 14:45:55 -0400 Received: from terminus.zytor.com ([198.137.202.10]:46662 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752685AbYHNSpy (ORCPT ); Thu, 14 Aug 2008 14:45:54 -0400 Message-ID: <48A47B83.3090408@zytor.com> Date: Thu, 14 Aug 2008 11:37:55 -0700 From: "H. Peter Anvin" User-Agent: Thunderbird 2.0.0.14 (X11/20080501) MIME-Version: 1.0 To: Jeremy Fitzhardinge CC: Mathieu Desnoyers , Andi Kleen , Linus Torvalds , Ingo Molnar , Steven Rostedt , Steven Rostedt , LKML , Thomas Gleixner , Peter Zijlstra , Andrew Morton , David Miller , Roland McGrath , Ulrich Drepper , Rusty Russell , Gregory Haskins , Arnaldo Carvalho de Melo , "Luis Claudio R. Goncalves" , Clark Williams , Christoph Lameter Subject: Re: [RFC PATCH] x86 alternatives : fix LOCK_PREFIX race with preemptible kernel and CPU hotplug References: <20080813200119.GA18966@Krystal> <20080813234156.GA25775@Krystal> <48A375E3.9090609@zytor.com> <48A388CE.2020404@goop.org> <20080814014944.GA31883@Krystal> <48A3A806.8060509@goop.org> <20080814151805.GA29507@Krystal> <48A459B1.2070601@zytor.com> <20080814165802.GC517@Krystal> <48A465F2.8000701@goop.org> <20080814173021.GA4697@Krystal> <48A46EC2.1010301@goop.org> In-Reply-To: <48A46EC2.1010301@goop.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1044 Lines: 24 Jeremy Fitzhardinge wrote: > > Ah, OK. I'd thought we started unlocked, but given that I've just been > disassembling the kernel and looking at the lock prefixes, that's a bit > of a braino on my part. > > BTW, using the ds prefix allows us to undo the hack of dealing with > locked instructions with exception handlers. There was a bug where if > we do lock->nop, then the address of a faulting instruction changes, so > we need exception records for both the locked and unlocked forms. Using > ds means the instruction size doesn't change, so we only need one > exception record. I don't remember off hand where that happens. > Using %ds: rather than nop really seems to solve a whole lot of problems, and might even be faster to boot. It really sounds like a no-brainer. -hpa -- 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/