Re: [patch] i386: use C code for current_thread_info()

From: Andi Kleen
Date: Mon Jun 12 2006 - 04:10:17 EST


Alistair John Strachan <s0348365@xxxxxxxxxxxx> writes:

> On Sunday 11 June 2006 20:42, Jan Engelhardt wrote:
> > >Using C code for current_thread_info() lets the compiler optimize it.
> > >With gcc 4.0.2, kernel is smaller:
> > >
> > > text data bss dec hex filename
> > > 3645212 555556 312024 4512792 44dc18 2.6.17-rc6-nb-post/vmlinux
> > > 3647276 555556 312024 4514856 44e428 2.6.17-rc6-nb/vmlinux
> > > -------
> > > -2064
> >
> > If possible, can you or someone post the results for x86_64?
>
> Patch is for i386, x86_64's current_thread_info() is already C.

Actually read_pda() is inline assembly. But so far gcc/binutils don't support
%gs references in the way the kernel needs it directly, so it has
to stay this way.

-Andi
-
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/