lkml.org 
[lkml]   [1997]   [Apr]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: binary format loader cache?
Date
From

In message <Pine.LNX.3.95.970408131938.3449C-100000@penguin.transmeta.com>, Lin
us Torvalds writes:
> On 8 Apr 1997, Michael O'Reilly wrote:
> > 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.
>
> Actually, the reason I haven't applied this is that I want something that
> goes a lot further: when a process gets an empty file structure that
> structure should be totally removed from the "available file structures"
> list), and then added back on when f_count goes back to zero. That way
> get_empty_filp() would be O(1), because it could just get the first file
> pointer on the list and _know_ that it is directly usable.

Ahh. I guess the question is, how often is the counter tampered with
relative to get_empty_filp() being called?

Note that post-patch, get_empty_filp() is examining an average of ~1.8
elements on the list. (results from some rough profiling on two
machines). Would the gain from making it O(1) outweigh the loss from
slowing down all the counter decrements?

Project for a rainy day I guess.

Michael.

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