On Thu, Jan 26, 2012 at 6:54 AM, John Baldwin <j...@freebsd.org> wrote: >> > 3. The code in bcache.c doesn't really implement an LRU - it implements >> > 'least recently added' algorithm, i.e. a kind of queue. Not that >> > it matters much, since it flushes the elements two seconds after >> > caching them anyway. I replaced it with Least Frequently Used. >> > LRU didn't behave well, as it tended to replace metadata with data >> > 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. However, 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 _______________________________________________ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "freebsd-hackers-unsubscr...@freebsd.org"