Date: Thu, 26 Jan 2012 10:22:02 -0800 From: Artem Belevich <art@freebsd.org> To: John Baldwin <jhb@freebsd.org> Cc: freebsd-hackers@freebsd.org, =?ISO-8859-2?Q?Edward_Tomasz_Napiera=B3a?= <trasz@freebsd.org> Subject: Re: Speeding up the loader(8). Message-ID: <CAFqOu6jRtqNrwJ%2B%2BVDgDtC22CXt-5v8W4h26Y6h43FkWg=nKPw@mail.gmail.com> In-Reply-To: <201201260954.23179.jhb@freebsd.org> References: <20120123215503.GA64787@geosci> <CAFqOu6ivT34T_RGHxuWZOTk2mCJ29P6wLY3RHt7=S-wH-Y0eYg@mail.gmail.com> <201201260954.23179.jhb@freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, Jan 26, 2012 at 6:54 AM, John Baldwin <jhb@freebsd.org> wrote: >> > 3. The code in bcache.c doesn't really implement an LRU - it implement= s >> > =A0 'least recently added' algorithm, i.e. a kind of queue. =A0Not tha= t >> > =A0 it matters much, since it flushes the elements two seconds after >> > =A0 caching them anyway. =A0I replaced it with Least Frequently Used. >> > =A0 LRU didn't behave well, as it tended to replace metadata with data >> > =A0 used only once. > > These sound reasonable, though I suspect they are in part due to dealing = with > floppies where the user can swap out of the disk and we have no way of > noticing otherwise. =A0However, we could possibly adjust some behavior to= cache > the bits if the disk is not a floppy drive. > >> 4. it flushes cache on access to a different drive which means that >> cache does not help on multi-disk ZFS setups. > > I believe this is also necessary to deal with floppies and the fact that = you > don't have a reliable way of knowing if a floppy has changed. Are floppies still relevant? When I attempted to address your concern about floppies that you raised when I've sent my patch, I've discovered that there's no floppy connector on any of the computers/motherboards that I have. Few years back I was amused by an Intel motherboard that came with a floppy disk with RAID drivers on it, but which had no floppy connector on the motherboard. In any case, it's easy enough to enforce old behavior for floppy drives. I will make required changes but I will not be able to test it due to lack of floppy drives. --Artem
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAFqOu6jRtqNrwJ%2B%2BVDgDtC22CXt-5v8W4h26Y6h43FkWg=nKPw>