Current-Users archive

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

Re: piixide write speed very slow - solved



At Thu, 10 Dec 2009 18:58:03 +0000, Matthias Scheler 
<tron%zhadum.org.uk@localhost> wrote:
Subject: Re: piixide write speed very slow - solved
> 
> On Thu, Dec 10, 2009 at 04:34:41PM +0000, Stephen Borrill wrote:
> > To this end I've written an rc.d script to alter the settings as desired:
> > ftp://ftp.netbsd.org/pub/NetBSD/misc/sborrill/drivecache.sh

I've written a similar script in the past myself to solve this very
issue, though I've also argued at times for the driver to be managing
these kinds of flags directly as well, though the cache flags alone may
need to be controlled by the admin, vs. say flags which turn on
automatic bad block handling where I would argue that such handling
should probably always be enabled if possible.


> Looks good in general.
> 
> Two suggestions however:
> 1.) I find $(cmd) much better readable then `cmd`.

Indeed, and somewhat "safer" too.


> 2.) I would be nice if the script by default at least *reports* all
>     drives with the write-cache turned off. If a user tests both
>     NetBSD and OpenBSD (or Linux, ...) with such a drive it is very
>     likely that will not even know why NetBSD is slow and just
>     assume that it is broken.

Indeed.

Also, if you're going to support alternate upper/lower case spellings
for flag variables then supporting them all at once is better and
clearer than choosing just two (or even all three sane ones):

        case "$drivecache_flags" in
-       OFF|off)
+       [oO][fF][fF])


Finally, perhaps the drivecache_list variable could accept a shell glob
pattern as well to match multiple units, etc.?

-- 
                                                Greg A. Woods
                                                Planix, Inc.

<woods%planix.com@localhost>       +1 416 218 0099        http://www.planix.com/

Attachment: pgpWRhB3CBEcd.pgp
Description: PGP signature



Home | Main Index | Thread Index | Old Index