From: Chuck Ebbert <76306.1226@compuserve.com>
To: Andrew Morton <akpm@osdl.org>
Cc: torvalds@osdl.org, linux-kernel@vger.kernel.org,
Arjan van de Ven <arjan@infradead.org>,
Adrian Bunk <bunk@stusta.de>
Subject: Re: [patch 2.6.13-rc3a] i386: inline restore_fpu
Date: Sat, 23 Jul 2005 03:09:25 -0400 [thread overview]
Message-ID: <200507230313_MC3-1-A554-6927@compuserve.com> (raw)
On Fri, 22 Jul 2005 at 13:27:56 +1000, Andrew Morton wrote:
> Chuck Ebbert <76306.1226@compuserve.com> wrote:
> > After:
> >
> > 12534 math_state_restore 130.5625
> > 8354 device_not_available 203.7561
> > -----
> > 20888
> > Next step should be to physically place math_state_restore() after
> > device_not_available(). Would such a patch be accepted? (Yes it
> > would be ugly and require linker script changes.)
>
> Depends on the benefit/ugly ratio ;)
This patch (may not apply cleanly to unpatched -rc3) drops overhead
a few more percent:
11835 math_state_restore 144.3293
8096 device_not_available 197.4634
-----
19931
Most of the exception/interrupt handlers should get the same treatment but
the linker script would grow.
Signed-off-by: Chuck Ebbert <76306.1226@compuserve.com>
Index: 2.6.13-rc3a/arch/i386/kernel/entry.S
===================================================================
--- 2.6.13-rc3a.orig/arch/i386/kernel/entry.S 2005-07-16 18:09:48.000000000 -0400
+++ 2.6.13-rc3a/arch/i386/kernel/entry.S 2005-07-22 05:19:22.000000000 -0400
@@ -469,6 +469,7 @@
pushl $do_simd_coprocessor_error
jmp error_code
+ .section ".text.i387_1", "a"
ENTRY(device_not_available)
pushl $-1 # mark this as an int
SAVE_ALL
@@ -484,6 +485,8 @@
addl $4, %esp
jmp ret_from_exception
+ .previous
+
/*
* Debug traps and NMI can happen at the one SYSENTER instruction
* that sets up the real kernel stack. Check here, since we can't
Index: 2.6.13-rc3a/arch/i386/kernel/traps.c
===================================================================
--- 2.6.13-rc3a.orig/arch/i386/kernel/traps.c 2005-07-16 18:05:40.000000000 -0400
+++ 2.6.13-rc3a/arch/i386/kernel/traps.c 2005-07-22 14:02:50.000000000 -0400
@@ -972,7 +972,8 @@
* Must be called with kernel preemption disabled (in this case,
* local interrupts are disabled at the call-site in entry.S).
*/
-asmlinkage void math_state_restore(struct pt_regs regs)
+asmlinkage void __attribute__((__section__(".text.i387_2")))
+math_state_restore(struct pt_regs regs)
{
struct thread_info *thread = current_thread_info();
struct task_struct *tsk = thread->task;
Index: 2.6.13-rc3a/arch/i386/kernel/vmlinux.lds.S
===================================================================
--- 2.6.13-rc3a.orig/arch/i386/kernel/vmlinux.lds.S 2005-07-16 18:05:39.000000000 -0400
+++ 2.6.13-rc3a/arch/i386/kernel/vmlinux.lds.S 2005-07-22 05:20:30.000000000 -0400
@@ -20,6 +20,8 @@
_text = .; /* Text and read-only data */
.text : AT(ADDR(.text) - LOAD_OFFSET) {
*(.text)
+ *(.text.i387_1)
+ *(.text.i387_2)
SCHED_TEXT
LOCK_TEXT
*(.fixup)
__
Chuck
next reply other threads:[~2005-07-23 7:14 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-07-23 7:09 Chuck Ebbert [this message]
2005-07-23 17:38 ` Linus Torvalds
2005-07-23 17:46 ` Arjan van de Ven
2005-07-23 18:02 ` Linus Torvalds
-- strict thread matches above, loose matches on Subject: below --
2005-07-27 1:40 linux
2005-07-26 21:23 Chuck Ebbert
2005-07-26 21:47 ` Linus Torvalds
2005-07-26 21:23 Chuck Ebbert
2005-07-25 2:34 Kenneth Parrish
2005-07-24 12:56 Kenneth Parrish
[not found] <200507212309_MC3-1-A534-95EF@compuserve.com.suse.lists.linux.kernel>
[not found] ` <20050722132756.578acca7.akpm@osdl.org.suse.lists.linux.kernel>
2005-07-23 15:35 ` Andi Kleen
2005-07-23 7:09 Chuck Ebbert
2005-07-23 17:33 ` Linus Torvalds
2005-07-22 9:58 Chuck Ebbert
2005-07-22 3:06 Chuck Ebbert
2005-07-22 3:27 ` Andrew Morton
2005-07-22 5:22 ` Linus Torvalds
2005-07-22 11:23 ` Arjan van de Ven
2005-07-22 8:14 ` Adrian Bunk
2005-07-22 18:13 ` Linus Torvalds
2005-07-25 19:26 ` Bill Davidsen
2005-07-22 23:19 ` Linus Torvalds
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=200507230313_MC3-1-A554-6927@compuserve.com \
--to=76306.1226@compuserve.com \
--cc=akpm@osdl.org \
--cc=arjan@infradead.org \
--cc=bunk@stusta.de \
--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
Powered by JetHome