lkml.org 
[lkml]   [1997]   [Apr]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
SubjectRe: binary format loader cache?
From
Date
tytso@mit.edu writes:
> We should very clearly change the binfmt interfaces so that open_inode()
> is called by do_execve(), instead of opening the file each time for
> binary format. Aaron Tiensivu's patch to speed up get_empty_filp() is
> important too, but there's a much more direct way to speed up

Im suprised my patch to get_empty_filp() still isn't in the
kernel. Note that it isn't just the exec()'s the suffer from the
REALLY bad running time, but just about everthing is slowed fairly
dramtically. On machines doing lots of open()'s etc, patching
get_empty_filp() will give you an instant 5% improvement.

Just to repeat it again, and CC it to linus....
--- linux/fs/file_table.c.old Tue Jul 30 19:47:35 1996
+++ linux/fs/file_table.c Tue Jul 30 19:59:41 1996
@@ -102,7 +102,7 @@
{
int i;
int max = max_files;
- struct file * f;
+ static struct file * f = NULL;

/*
* Reserve a few files for the super-user..
@@ -111,15 +111,25 @@
max -= 10;

/* if the return is taken, we are in deep trouble */
- if (!first_file && !grow_files())
- return NULL;
+ if (!first_file) {
+ if (!grow_files())
+ return NULL;
+ f = first_file;
+ }

do {
- for (f = first_file, i=0; i < nr_files; i++, f = f->f_next)
+ for (f = f->f_next, i=0; i < nr_files; i++, f = f->f_next)
if (!f->f_count) {
+#if 1
+ f->f_mode = f->f_pos = f->f_flags = f->f_count =
+ f->f_reada = f->f_ramax = f->f_raend = f->f_ralen =
+ f->f_rawin = f->f_owner = 0;
+ f->private_data = f->f_op = f->f_inode = NULL;
+#else
remove_file_free(f);
memset(f,0,sizeof(*f));
put_last_free(f);
+#endif
f->f_count = 1;
f->f_version = ++event;
return f;



\
 
 \ /
  Last update: 2005-03-22 13:39    [from the cache]
©2003-2011 Jasper Spaans