Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932447AbVKWVOG (ORCPT ); Wed, 23 Nov 2005 16:14:06 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S932458AbVKWVOG (ORCPT ); Wed, 23 Nov 2005 16:14:06 -0500 Received: from mx1.suse.de ([195.135.220.2]:62611 "EHLO mx1.suse.de") by vger.kernel.org with ESMTP id S932447AbVKWVOD (ORCPT ); Wed, 23 Nov 2005 16:14:03 -0500 Date: Wed, 23 Nov 2005 22:13:53 +0100 From: Andi Kleen To: Alan Cox Cc: Linus Torvalds , "H. Peter Anvin" , Andi Kleen , Gerd Knorr , Dave Jones , Zachary Amsden , Pavel Machek , Andrew Morton , Linux Kernel Mailing List , Zwane Mwaikambo , Pratap Subrahmanyam , Christopher Li , "Eric W. Biederman" , Ingo Molnar Subject: Re: [patch] SMP alternatives Message-ID: <20051123211353.GR20775@brahms.suse.de> References: <437B5A83.8090808@suse.de> <438359D7.7090308@suse.de> <1132764133.7268.51.camel@localhost.localdomain> <20051123163906.GF20775@brahms.suse.de> <1132766489.7268.71.camel@localhost.localdomain> <4384AECC.1030403@zytor.com> <1132782245.13095.4.camel@localhost.localdomain> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1132782245.13095.4.camel@localhost.localdomain> Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1134 Lines: 24 On Wed, Nov 23, 2005 at 09:44:05PM +0000, Alan Cox wrote: > On Mer, 2005-11-23 at 10:42 -0800, Linus Torvalds wrote: > > Of course, if it's in one of the low 12 bits of %cr3, there would have to > > be a "enable this bit" in %cr4 or something. Historically, you could write > > any crap in the low bits, I think. > > There is a much much better way to do it than just user space and > without hitting cr3/cr4 - put "lock works" in the PAT and while we'll > have to add PAT support which we need to do anyway we would get a world > where on uniprocessor lock prefix only works on addresse targets we want > it to - ie pci_alloc_consistent() pages. The idea was to turn LOCK on only if the process has any shared writable mapping and num_online_cpus() > 0. Might be a bit costly to rewrite all the page tables for that case just to change the PAT index. A bit is nicer for that. -Andi - 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/