How about if an unused member (when f_count dropped to zero) got placed at
the front of the list?
As it is, the "found" one is moved to the end of the list, so wouldn't the
empty ones tend to bubble up? (I don't know the access pattern, so I'm just
guessing.)
FWIW, "get_request" (in ll_rw_blk.c) does a linear search, starting from
where it stopped last time. This bothers me. It seems like a linear search
for a free element is inherently inefficient.
find_buffer (fs/buffer.c) also does a linear search, but uses a ridiculously
large (hash) table of listheads.
However, I think that before mucking with this, it would be best to capture
the access pattern (alloc/free) of a running system, and use this to
experiment with different algorithms. Yup, this would be a HUGE amount of
data to collect.
-30- Ray
>
> Michael.
>