From: Andrew Morton <akpm@digeo.com>
To: William Lee Irwin III <wli@holomorphy.com>
Cc: Bill Davidsen <davidsen@tmr.com>,
Aaron Lehmann <aaronl@vitelus.com>,
Con Kolivas <conman@kolivas.net>,
linux kernel mailing list <linux-kernel@vger.kernel.org>
Subject: Re: [BENCHMARK] 2.5.47{-mm1} with contest
Date: Wed, 20 Nov 2002 22:54:40 -0800 [thread overview]
Message-ID: <3DDC8330.FE066815@digeo.com> (raw)
In-Reply-To: 20021121000811.GQ23425@holomorphy.com
William Lee Irwin III wrote:
>
> ...
> On Wed, Nov 20, 2002 at 03:02:24PM -0800, Andrew Morton wrote:
> > signal_test 30000 122 122000.00 Signal Traps/second
> > signal_test 10000 91.7 91700.00 Signal Traps/second
> > Signal delivery is a lot slower in 2.5. I do not know why,
>
> Similar things have been reported with 2.4.x vs. 2.2.x and IIRC there
> was some speculation they were due to low-level arch code interactions.
> I think this merits some investigation. I, for one, am a big user of
> SIGIO in userspace C programs...
>
OK, got it back to 119000. Each signal was calling copy_*_user 24 times.
This gets it down to six.
--- 25/arch/i386/kernel/i387.c~signal-speedup Wed Nov 20 20:44:56 2002
+++ 25-akpm/arch/i386/kernel/i387.c Wed Nov 20 21:06:04 2002
@@ -232,7 +232,7 @@ void set_fpu_mxcsr( struct task_struct *
* FXSR floating point environment conversions.
*/
-static inline int convert_fxsr_to_user( struct _fpstate *buf,
+static int convert_fxsr_to_user( struct _fpstate *buf,
struct i387_fxsave_struct *fxsave )
{
unsigned long env[7];
@@ -254,13 +254,18 @@ static inline int convert_fxsr_to_user(
to = &buf->_st[0];
from = (struct _fpxreg *) &fxsave->st_space[0];
for ( i = 0 ; i < 8 ; i++, to++, from++ ) {
- if ( __copy_to_user( to, from, sizeof(*to) ) )
+ unsigned long *t = (unsigned long *)to;
+ unsigned long *f = (unsigned long *)from;
+
+ if (__put_user(*f, t) ||
+ __put_user(*(f + 1), t + 1) ||
+ __put_user(from->exponent, &to->exponent))
return 1;
}
return 0;
}
-static inline int convert_fxsr_from_user( struct i387_fxsave_struct *fxsave,
+static int convert_fxsr_from_user( struct i387_fxsave_struct *fxsave,
struct _fpstate *buf )
{
unsigned long env[7];
@@ -283,7 +288,12 @@ static inline int convert_fxsr_from_user
to = (struct _fpxreg *) &fxsave->st_space[0];
from = &buf->_st[0];
for ( i = 0 ; i < 8 ; i++, to++, from++ ) {
- if ( __copy_from_user( to, from, sizeof(*from) ) )
+ unsigned long *t = (unsigned long *)to;
+ unsigned long *f = (unsigned long *)from;
+
+ if (__get_user(*f, t) ||
+ __get_user(*(f + 1), t + 1) ||
+ __get_user(from->exponent, &to->exponent))
return 1;
}
return 0;
@@ -305,7 +315,7 @@ static inline int save_i387_fsave( struc
return 1;
}
-static inline int save_i387_fxsave( struct _fpstate *buf )
+static int save_i387_fxsave( struct _fpstate *buf )
{
struct task_struct *tsk = current;
int err = 0;
@@ -355,7 +365,7 @@ static inline int restore_i387_fsave( st
sizeof(struct i387_fsave_struct) );
}
-static inline int restore_i387_fxsave( struct _fpstate *buf )
+static int restore_i387_fxsave( struct _fpstate *buf )
{
int err;
struct task_struct *tsk = current;
@@ -373,7 +383,7 @@ int restore_i387( struct _fpstate *buf )
if ( HAVE_HWFP ) {
if ( cpu_has_fxsr ) {
- err = restore_i387_fxsave( buf );
+ err = restore_i387_fxsave( buf );
} else {
err = restore_i387_fsave( buf );
}
_
next prev parent reply other threads:[~2002-11-21 6:47 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-11-11 23:31 [BENCHMARK] 2.5.47{-mm1} with contest Con Kolivas
2002-11-12 0:09 ` Andrew Morton
2002-11-12 1:51 ` Con Kolivas
2002-11-12 2:07 ` mark walters
2002-11-12 2:18 ` Con Kolivas
2002-11-12 8:52 ` Giuliano Pochini
2002-11-12 9:20 ` Jens Axboe
2002-11-12 9:40 ` Con Kolivas
2002-11-12 3:04 ` Aaron Lehmann
2002-11-12 11:04 ` Andrew Morton
2002-11-12 14:20 ` Aaron Lehmann
2002-11-12 14:23 ` Jens Axboe
2002-11-12 20:37 ` Bill Davidsen
2002-11-12 20:59 ` Andrew Morton
2002-11-20 23:02 ` Andrew Morton
2002-11-21 0:08 ` William Lee Irwin III
2002-11-21 1:11 ` Alan Cox
2002-11-21 6:54 ` Andrew Morton [this message]
2002-11-21 13:20 ` Dave Jones
2002-11-21 17:21 ` Andrew Morton
2002-11-21 17:26 ` William Lee Irwin III
2002-11-21 18:18 ` Dave Jones
2002-11-21 18:25 ` Bill Davidsen
2002-11-21 14:00 ` Dave Jones
2002-11-21 19:59 ` 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=3DDC8330.FE066815@digeo.com \
--to=akpm@digeo.com \
--cc=aaronl@vitelus.com \
--cc=conman@kolivas.net \
--cc=davidsen@tmr.com \
--cc=linux-kernel@vger.kernel.org \
--cc=wli@holomorphy.com \
/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