Subject: question about TAILQ use in lfs_writevnodes() (lfs_segment.c)
To: None <tech-kern@netbsd.org>
From: Blair Sadewitz <blair.sadewitz@gmail.com>
List: tech-kern
Date: 01/03/2007 15:12:53
Is it safe to change the "if 0" to "if 1", thereby having the code use
TAILQ_FOREACH_REVERSE() instead of TAILQ_FOREACH()?  This seems (I
haven't tested it thoroughly enough yet to claim "it does") to speed
up chmod/chown operations significantly.  Moreover, they only take 15%
of CPU instead of 95%.  Unfortunately, it seems I can still back up
the queue enough to gobble up CPU by untarring pkgsrc, etc.  Actually
fixing this problem is certainly beyond what I can do, but IMHO it's a
huge problem as ordinary users might be able to use it as a DoS
attack.

I presume that starting with the most recent vnode instead of the
oldest is unsafe, otherwise it wouldn't be #if 0'd out.  However, I
have been using many LFS partitions for 1-2 days so far this way
without any detectable problems (which I cannot draw any sound
conclusions from, but still ...).

Regards,

--Blair

-- 
Support WFMU-FM: free-form radio for the masses!

<http://www.wfmu.org/>
91.1 FM Jersey City, NJ
90.1 FM Mt. Hope, NY

"The Reggae Schoolroom":
<http://www.wfmu.org/playlists/RS/>