DragonFly kernel List (threaded) for 2006-07
Re: vinum start config disk thrashing
:I noticed that a "start" in vinum results in quite heavy disk thrasing he=
:re. I found out why:
:- start results in a "read /dev/ad0 /dev/ad4"
:- read tries all slices and partitions therein
:- each try opens the partition
:- each opening of a partition results in the kernel re-scanning all slice=
: tables and disklabels
:so this means for each of my ntfs slices and for my bsd partitions the ke=
:rnel will read all slice tables (including extended slices) and all diskl=
:abels, which is quite a lot.
:why don't we cache this information until it is invalidated or something?=
: how would we do that? I found this comment in kern/subr_diskslice.c:ds=
: * XXX reinitialize the slice table unless there is an open devic=
: * on the unit. This should only be done if the media has change=
:and that's obviously the problem.
This is a little hairy, because two things can happen: First, a
program like disklabel or fdisk might open a disk and modify the
slice or partition table. Second, media might change out from
under the kernel.
Also, opening the raw disk (e.g. /dev/da0) no longer tries to
scan anything (nor should it), so we can't open the raw disk and
hold it open while we scan the rest.
I'm not sure that we want to try to cache the information when
nobody has it open, because of #2 above.
Or, alternatively, we could cache the information for up to N
ticks (e.g like one second) after the last close. That might