DragonFly BSD
DragonFly kernel List (threaded) for 2006-07
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

Re: vinum start config disk thrashing


From: Matthew Dillon <dillon@xxxxxxxxxxxxxxxxxxxx>
Date: Sat, 8 Jul 2006 19:25:14 -0700 (PDT)

:Hey,
:
: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=
:open():
:
:        /*=20
:         * XXX reinitialize the slice table unless there is an open devic=
:e
:         * on the unit.  This should only be done if the media has change=
:d.
:         */
:
:and that's obviously the problem.
:
:ideas?
:
:cheers
:  simon
    
    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
    work ok.

						-Matt




[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]