lkml.org 
[lkml]   [1997]   [Mar]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: asm/uaccess.h reimplementation, patch. [was: Re: 2.1 kernel bloat revisited]

On Mon, 31 Mar 1997, Paul Gortmaker wrote:

> > would be nice to see what speed difference it makes. I have the feeling
> > that P5s see lots of pipeline stalls in access_ok().
>
> While far from a P5, this is interesting information regardless.
> Time to process a 270 page LaTeX document on a 386-40 (128k cache) with
> 5MB RAM, /usr and tex doc via NFS (kernel v2.1.30).
>
> With access_ok() defined to "1".
>
> ------------------------------------------------------------------------
> Memory: 4192k/5504k available (528k kernel code, 384k reserved, 400k data)
>
> 119.980u 77.100s 3:26.28 95.5% 0+0k 0+0io 139pf+0w
> 118.220u 75.850s 3:22.73 95.7% 0+0k 0+0io 129pf+0w
> 115.770u 76.050s 3:23.03 94.4% 0+0k 0+0io 131pf+0w
> ------------------------------------------------------------------------
>
>
> With access_ok() doing what it is supposed to do:
>
> ------------------------------------------------------------------------
> Memory: 4152k/5504k available (564k kernel code, 384k reserved, 404k data)
>
> 124.380u 109.470s 4:04.16 95.7% 0+0k 0+0io 187pf+56w
> 120.510u 111.490s 4:00.93 96.2% 0+0k 0+0io 142pf+0w
> 119.580u 109.490s 3:58.02 96.2% 0+0k 0+0io 133pf+0w
> ------------------------------------------------------------------------

ugh. Ok, here is a patch that simulates the syscall overhead of my
previously mailed %fs scheme (keep access_ok() == 1):

-------------------------------------------------->
--- entry.S.original Sun Mar 30 18:58:19 1997
+++ entry.S Sun Mar 30 19:02:47 1997
@@ -85,6 +85,8 @@

#define SAVE_ALL \
cld; \
+ push %fs; \
+ pop %fs; \
push %es; \
push %ds; \
pushl %eax; \
@@ -108,6 +110,8 @@
popl %eax; \
pop %ds; \
pop %es; \
+ push %fs; \
+ pop %fs; \
addl $4,%esp; \
iret
<-------------------------------------------------

very curious what your benchmark says about this one. [btw, the patch adds
a bit more overhead than necessary]. The patch is untested but if >this<
patch goes wrong i have to quit hacking for a few days ... :)
-- mingo


\
 
 \ /
  Last update: 2005-03-22 13:39    [W:0.040 / U:0.088 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site