Re: ext2fs enhacement/fix [re: shrinking directories]

David Ford (david@kalifornia.com)
Sun, 19 Jul 1998 02:22:52 -0700 (PDT)


On Sun, 19 Jul 1998, Jan Kara wrote:
> > another idea instead of physically shrinking. sort the structure, placing
> > all in use information at the top and implementing a 'last used' marker.
> If you sort the dir-entries often (once per hour or so) you'll spend too
> much time with it (It's not easy to do it when FS is mounted). If you sort
> the structure once per week it won't have noticeable (?) effect IMHO (especially
> in the case of news...).

an opportunity for a simple heuristic or a /proc ctl. even a mount
option.

even a partial sort. as in when a file is accessed, that struct is bumped
up one index if it isn't in the dcache or it's access time is greater than
the tuned limit. reason why i say that is because it limits the amount of
structure updating. over time, all the frequently used entries will sit
at the top and the aged and ghost entries at the bottom.

this will make for a very fast shrink procedure if the shrink procedure is
called an order of times greater than the struct update period.

this serves to mimise the impact of sorting from the most used entries to
the ghost entries and minimise the expense of a shrink procedure.

do bear in mind i'm hardly lucid after a few days and only a few hours of
sleep. :)

-d

--
Please read the linux/Documentation/ files and review the last week of mail
on linux-kernel before posting your problem.
           PLEASE don't quote _many_ lines and type _few_ lines
 -thx

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.altern.org/andrebalsa/doc/lkml-faq.html