mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Chuck Ebbert <76306.1226@compuserve.com>
To: "cutaway@bellsouth.net" <cutaway@bellsouth.net>,
	"Denis Vlasenko" <vda@ilport.com.ua>
Cc: "linux-kernel" <linux-kernel@vger.kernel.org>,
	"Coywolf Qi Hunt" <coywolf@gmail.com>
Subject: Re: [RFC] exit_thread() speedups in x86 process.c
Date: Fri, 1 Jul 2005 22:57:00 -0400	[thread overview]
Message-ID: <200507012258_MC3-1-A340-3A81@compuserve.com> (raw)

On Wed, 22 Jun 2005 at 04:41:47 -0400, cutaway wrote:

> The compilers got tweaked to be able to emit
> function code to different text sections and a massive system wide code
> triage was undertaken based on "common usage scenario" profiling run data
> from the perf analysis group.

  Linux scheduler code is in its own text section already, but
that might be for profiling the code instead of for performance.
(Look for "__sched" in the source code.)

  The gains may not be as much as you think since on X86 and at least
some other archs the entire kernel is in one large page.  Still, it's
got to make some kind of sense to put infrequently-used code in its
own section just to reduce cache pollution.

  I came up with this but only the "__slow" part really makes sense:


--- 2.6.12.1/arch/i386/kernel/vmlinux.lds.S     2004-09-03 19:55:27.000000000 -0400
+++ 2.6.12.1-ce1/arch/i386/kernel/vmlinux.lds.S 2005-06-26 01:48:23.770212000 -0400
@@ -16,9 +16,11 @@ SECTIONS
   /* read-only */
   _text = .;                   /* Text and read-only data */
   .text : {
+       *(.fast.text)
        *(.text)
        SCHED_TEXT
        LOCK_TEXT
+       *(.slow.text)
        *(.fixup)
        *(.gnu.warning)
        } = 0x9090
--- 2.6.12.1/arch/x86_64/kernel/vmlinux.lds.S   2005-06-24 00:50:21.180212000 -0400
+++ 2.6.12.1-ce1/arch/x86_64/kernel/vmlinux.lds.S       2005-06-26 01:50:09.100212000 -0400
@@ -15,9 +15,11 @@ SECTIONS
   phys_startup_64 = startup_64 - LOAD_OFFSET;
   _text = .;                   /* Text and read-only data */
   .text : {
+       *(.fast.text)
        *(.text)
        SCHED_TEXT
        LOCK_TEXT
+       *(.slow.text)
        *(.fixup)
        *(.gnu.warning)
        } = 0x9090
--- 2.6.12.1/include/linux/init.h       2005-01-04 21:48:02.000000000 -0500
+++ 2.6.12.1-ce1/include/linux/init.h   2005-06-26 01:59:29.580212000 -0400
@@ -46,6 +46,17 @@
 #define __exitdata     __attribute__ ((__section__(".exit.data")))
 #define __exit_call    __attribute_used__ __attribute__ ((__section__ (".exitcall.exit")))
 
+/*
+ * Probably belongs in some other header (compiler.h?)
+ */
+#ifdef CONFIG_X86
+#define __fast         __attribute__ ((__section__(".fast.text")))
+#define __slow         __attribute__ ((__section__(".slow.text")))
+#else
+#define __fast
+#define __slow
+#endif
+
 #ifdef MODULE
 #define __exit         __attribute__ ((__section__(".exit.text")))
 #else

--
Chuck

             reply	other threads:[~2005-07-02  2:59 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-07-02  2:57 Chuck Ebbert [this message]
2005-07-02 11:56 ` Denis Vlasenko
2005-07-03 11:45   ` function ordering (was: Re: [RFC] exit_thread() speedups in x86 process.c) Arjan van de Ven
2005-07-03 12:30     ` Hugh Dickins
2005-07-03 12:48       ` Arjan van de Ven
2005-07-04  9:29       ` Christoph Hellwig
2005-07-04 10:28         ` Hugh Dickins
2005-07-03 19:59   ` [RFC] exit_thread() speedups in x86 process.c cutaway
  -- strict thread matches above, loose matches on Subject: below --
2005-07-05 18:30 William Cohen
     [not found] <200507012258_MC3-1-A340-3A81@compuserve.com.suse.lists.linux.kernel>
     [not found] ` <200507021456.40667.vda@ilport.com.ua.suse.lists.linux.kernel>
2005-07-03 16:05   ` Andi Kleen
2005-06-22  5:48 Chuck Ebbert
2005-06-22  8:41 ` cutaway
2005-06-14  1:16 cutaway
2005-06-14  3:08 ` Coywolf Qi Hunt
2005-06-14  4:26   ` cutaway
2005-06-14  7:43     ` Denis Vlasenko

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=200507012258_MC3-1-A340-3A81@compuserve.com \
    --to=76306.1226@compuserve.com \
    --cc=coywolf@gmail.com \
    --cc=cutaway@bellsouth.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=vda@ilport.com.ua \
    /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®