Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S263561AbUAPA2f (ORCPT ); Thu, 15 Jan 2004 19:28:35 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S263622AbUAPA2e (ORCPT ); Thu, 15 Jan 2004 19:28:34 -0500 Received: from smtp2.fre.skanova.net ([195.67.227.95]:29160 "EHLO smtp2.fre.skanova.net") by vger.kernel.org with ESMTP id S263561AbUAPA0W (ORCPT ); Thu, 15 Jan 2004 19:26:22 -0500 To: Linus Torvalds Cc: Andi Kleen , Andi Kleen , Andrew Morton , jh@suse.cz, Kernel Mailing List Subject: Re: [PATCH] Add noinline attribute References: <20040114083114.GA1784@averell> <20040115074834.GA38796@colin2.muc.de> From: Peter Osterlund Date: 16 Jan 2004 01:26:10 +0100 In-Reply-To: Message-ID: User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1173 Lines: 23 Linus Torvalds writes: > On Wed, 15 Jan 2004, Andi Kleen wrote: > > > > That's fine for me. In fact I did this some time ago on x86-64 when I > > ran into similar problems. Here's a port of the x86-64 sort function. > > Ugh. Can't we just make this be generic code (and that means calling it in > the module loading code too..)? > > As to bubble sort (which is fine for something that is 99% sorted anyway), > isn't it better to continue pushing the entry down when you find something > out of order? That way you don't have to repeat the whole scan, you just > continue with the next entry once the unsorted entry has percolated to its > place (ie keep entries "0..n-1" sorted at all times). That should make the > code cleaner too. Yes, that algorithm is called insertion sort and is already implemented in the ppc arch. -- Peter Osterlund - petero2@telia.com http://w1.894.telia.com/~u89404340 - 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/