mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Chuck Ebbert <76306.1226@compuserve.com>
To: Linus Torvalds <torvalds@osdl.org>
Cc: Andrew Morton <akpm@osdl.org>,
	linux-kernel <linux-kernel@vger.kernel.org>
Subject: Re: [patch] i386: use C code for current_thread_info()
Date: Sun, 11 Jun 2006 16:43:36 -0400	[thread overview]
Message-ID: <200606111647_MC3-1-C228-993B@compuserve.com> (raw)

In-Reply-To: <Pine.LNX.4.64.0606111225380.5498@g5.osdl.org>

On Sun, 11 Jun 2006 12:33:10 -0700, Linus Torbalds wrote:

> On Sun, 11 Jun 2006, Chuck Ebbert wrote:
> >
> > Using C code for current_thread_info() lets the compiler optimize it.
> 
> Ok, me likee. I just worry that this might break some older gcc version. 
> Have you checked with gcc-3.2 or something?

I just tried gcc 3.3.3 and the kernel gets a little bigger but it boots
and runs OK. That's the oldest compiler I can find.

   text    data     bss     dec     hex filename
3593627  559864  342728 4496219  449b5b 2.6.17-rc6-32-post/vmlinux
3591371  559864  342728 4493963  44928b 2.6.17-rc6-32/vmlinux
  +2256

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.

-- 
Chuck


             reply	other threads:[~2006-06-11 20:48 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-06-11 20:43 Chuck Ebbert [this message]
2006-06-11 21:05 ` Emmanuel Fleury
  -- strict thread matches above, loose matches on Subject: below --
2006-06-13  5:26 Albert Cahalan
2006-06-13  1:50 Chuck Ebbert
2006-06-13  6:43 ` Andreas Mohr
2006-06-13  9:27   ` Avi Kivity
2006-06-12 17:14 Chuck Ebbert
2006-06-12 17:55 ` Adrian Bunk
2006-06-12 18:48 ` Andreas Mohr
2006-06-11 19:07 Chuck Ebbert
2006-06-11 19:33 ` Linus Torvalds
2006-06-11 19:42 ` Jan Engelhardt
2006-06-11 20:33   ` Jan Engelhardt
2006-06-11 20:44   ` Alistair John Strachan
2006-06-12  8:10     ` Andi Kleen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200606111647_MC3-1-C228-993B@compuserve.com \
    --to=76306.1226@compuserve.com \
    --cc=akpm@osdl.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@osdl.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®