lkml.org 
[lkml]   [1996]   [Dec]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subjectlinux/fs/open.c:sys_open() & filename zero copy patch


we currently do getname() to copy the pathname from user-space to
kernel-space. Is this necessary?

I'm now running a kernel with the following patch, that uses the
user-space pointer. [the patch is against vanilla 2.1.13]

the open("temptemp",rw) benchmark went down from 39 usecs to 30 usecs,
mainly due to the __get_free_page() & free() we are not doing now. [on a
100 MHz Neptun]

-- mingo

ps. there are some other places where we use getname() ...
ps2. is it really this easy? :)

--- linux/fs/.open.c.original Sun Dec 1 12:20:02 1996
+++ linux/fs/open.c Sun Dec 1 12:21:18 1996
@@ -573,19 +573,14 @@

asmlinkage int sys_open(const char * filename,int flags,int mode)
{
- char * tmp;
int fd, error;

fd = get_unused_fd();
if (fd < 0)
return fd;
- error = getname(filename, &tmp);
- if (!error) {
- error = do_open(tmp,flags,mode, fd);
- putname(tmp);
- if (!error)
- return fd;
- }
+ error = do_open(filename,flags,mode, fd);
+ if (!error)
+ return fd;
put_unused_fd(fd);
return error;
}

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