lkml.org 
[lkml]   [2006]   [Jun]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [patch] i386: use C code for current_thread_info()
In-Reply-To: <448C85B7.1010902@labri.fr>

On Sun, 11 Jun 2006 23:05:59 +0200, Emmanuel Fleury wrote:

> > Looking at the generated code, it seems the compiler just makes dumb
> > choices and tends to recompute current_thread_info() in unlikely code
> > paths even when there is no register pressure. 4.0.2 makes better
> > choices.
>
> What size with gcc 4.1.2 ? (just curiosity)

The 3.3 vs 4.0 comparisons were with two different configs, so only
relative gain/loss with asm vs. C could be compared.

I downloaded gcc 4.1.1 and compared to 4.0.2 with the exact same config,
since I was curious how much better it might be overall.

gcc 4.0.2:
text data bss dec hex filename
3645212 555556 312024 4512792 44dc18 2.6.17-rc6-nb-C/vmlinux
3647276 555556 312024 4514856 44e428 2.6.17-rc6-nb-asm/vmlinux
-2064

gcc 4.1.1:
text data bss dec hex filename
3614686 520416 311672 4446774 43da36 2.6.17-rc6-nb-C/vmlinux
3616942 520416 311672 4449030 43e306 2.6.17-rc6-nb-asm/vmlinux
-2256

Kernel code starts out ~30K bytes smaller with gcc 4.1 and using C
for current_thread_info() helps even more than with 4.0. Nice...

Maybe a patch that enables C code for gcc 4.0+ would work, since
on 3.3 the asm code is better?

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

\
 
 \ /
  Last update: 2006-06-12 19:22    [W:0.037 / U:0.188 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site