Subject: Re: dump and nodump flag
To: Manuel Bouyer <bouyer@antioche.lip6.fr>
From: Brian C. Grayson <bgrayson@marvin.ece.utexas.edu>
List: tech-kern
Date: 03/07/1999 12:13:34
On Sun, Mar 07, 1999 at 04:51:18PM +0100, Manuel Bouyer wrote:
> On Mar 3, Brian C. Grayson wrote
> >   Hm.  Is there any reason we can't do pass 1 and 2 (including
> > the nodump stuff) at the same time?
> 
> Well, this has the usual problem of recursive code: memory usage on
> the stack can become very higth, which can be a problem for low-memory
> machines. The second problem is that inodes are not read in order,
> which can make things considerably slower. Maybe both can be solved
> with an intelligent caching algorithm, but this is not an easy task.

  Those are definitely valid points.  One advantage of a
recursive version is that I _think_ dumpdirmap would no longer
be needed.  So if the stack usage is less than #inodes/8 bytes, it's
a win from the space point of view. 

  On not reading the inodes in order:  The current code reads a
directory inode, and then its data blocks.  If the fs has been
able to maintain good locality between an inode and its
datablocks, I'm _hoping_ it's also been able to maintain good
locality between an inode and its children inodes.

  I'm not convinced yet that either way is clearly better from a
performance point of view, so there's only one way to find out
for sure... :) Someday, I'll probably try to code it up, and do
some analysis to see which is better and why.

  Brian