Re: [PATCH] Add noinline attribute

From: Peter Osterlund
Date: Thu Jan 15 2004 - 19:31:04 EST


Linus Torvalds <torvalds@xxxxxxxx> 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@xxxxxxxxx
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@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/