From owner-freebsd-hackers@FreeBSD.ORG Thu Jan 26 18:43:30 2012 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7B4041065675; Thu, 26 Jan 2012 18:43:30 +0000 (UTC) (envelope-from fjwcash@gmail.com) Received: from mail-vx0-f182.google.com (mail-vx0-f182.google.com [209.85.220.182]) by mx1.freebsd.org (Postfix) with ESMTP id F0C8A8FC20; Thu, 26 Jan 2012 18:43:29 +0000 (UTC) Received: by vcmm1 with SMTP id m1so1025725vcm.13 for ; Thu, 26 Jan 2012 10:43:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; bh=nJkqwVj7+1sgpZQyses4SZDoU3xIiDVqvjKfT7tR4mA=; b=QX//WvnvBBu4LCQFVy/BJk1D2nXvOmP+6xLNxZqcVU1nlQyIxcaMBJCIzclmzswUPH NAlWWIjj6AyMBcCE+S2GGgvzoo7tLtTOZslxGteDXkJNz7xeGl5P0LbumzIGM5HKhs7w dZ77qUrziYknU/IJiiqaqyMJxTzBl3vyNhDWM= MIME-Version: 1.0 Received: by 10.221.13.196 with SMTP id pn4mr1934526vcb.74.1327603409147; Thu, 26 Jan 2012 10:43:29 -0800 (PST) Received: by 10.220.117.11 with HTTP; Thu, 26 Jan 2012 10:43:29 -0800 (PST) In-Reply-To: References: <20120123215503.GA64787@geosci> <201201260954.23179.jhb@freebsd.org> Date: Thu, 26 Jan 2012 10:43:29 -0800 Message-ID: From: Freddie Cash To: Artem Belevich Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Cc: freebsd-hackers@freebsd.org, =?UTF-8?Q?Edward_Tomasz_Napiera=C5=82a?= Subject: Re: Speeding up the loader(8). X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Jan 2012 18:43:30 -0000 On Thu, Jan 26, 2012 at 10:22 AM, Artem Belevich wrote: > On Thu, Jan 26, 2012 at 6:54 AM, John Baldwin wrote: >>> > 3. The code in bcache.c doesn't really implement an LRU - it implemen= ts >>> > =C2=A0 'least recently added' algorithm, i.e. a kind of queue. =C2=A0= Not that >>> > =C2=A0 it matters much, since it flushes the elements two seconds aft= er >>> > =C2=A0 caching them anyway. =C2=A0I replaced it with Least Frequently= Used. >>> > =C2=A0 LRU didn't behave well, as it tended to replace metadata with = data >>> > =C2=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. =C2=A0However, we could possibly adjust some behavio= r 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. USB-based floppy drives are still common. We use them to upgrade firmware, upgrade BIOS, install drivers, etc on our servers ... none of which have floppy headers on the motherboard. But the BIOSes still support floppies, and floppies are still used a lot (unfortunately). Now, whether or not a floppy-based loader would be useful for FreeBSD ... --=20 Freddie Cash fjwcash@gmail.com