Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932564AbVKWWDc (ORCPT ); Wed, 23 Nov 2005 17:03:32 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S932567AbVKWWDc (ORCPT ); Wed, 23 Nov 2005 17:03:32 -0500 Received: from nevyn.them.org ([66.93.172.17]:5805 "EHLO nevyn.them.org") by vger.kernel.org with ESMTP id S932564AbVKWWDb (ORCPT ); Wed, 23 Nov 2005 17:03:31 -0500 Date: Wed, 23 Nov 2005 17:03:24 -0500 From: Daniel Jacobowitz To: "H. Peter Anvin" Cc: Linus Torvalds , Alan Cox , 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: <20051123220324.GA24517@nevyn.them.org> Mail-Followup-To: "H. Peter Anvin" , Linus Torvalds , Alan Cox , 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 References: <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> <20051123214835.GA24044@nevyn.them.org> <4384E4F7.9060806@zytor.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4384E4F7.9060806@zytor.com> User-Agent: Mutt/1.5.8i Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1716 Lines: 40 On Wed, Nov 23, 2005 at 01:53:59PM -0800, H. Peter Anvin wrote: > Daniel Jacobowitz wrote: > > > >I don't think I see the point. This would let you optimize for the > >"multi-threaded, but hasn't created any threads yet" or even > >"multi-threaded, but not right now" cases. But those really aren't the > >interesting case to optimize for - that's the equivalent of supporting > >CPU hotplug. > > > >The interesting case is when you know at static link time that the > >library is single-threaded, or even at dynamic link time. And it's > >easy enough at both of those times to handle this. In many cases glibc > >doesn't, because it's valid to dlopen libpthread.so, but that could be > >accomodated - a simple matter of software. > > > > No, you can never know that unless you can't call mmap(). Please explain what problem you see. If you use mmap to manually load libpthread.so, and patch up its relocations without going to ld.so, obviously you get to keep both pieces. Or are you talking about synchronizing access to shared mmaped buffers? This is different from what Linus was talking about precisely because we can do it imperatively ("I know this program is single-threaded and I'm telling you so" instead of "Hmm, this program hasn't called clone yet"). It's not as technologically slick but I'd need a lot of convincing to believe it wasn't just as useful; and it has the benefit of not requiring new silicon. -- Daniel Jacobowitz CodeSourcery, LLC - 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/