From owner-freebsd-current@FreeBSD.ORG Tue Mar 5 05:19:53 2013 Return-Path: Delivered-To: freebsd-current@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id D0824564; Tue, 5 Mar 2013 05:19:53 +0000 (UTC) (envelope-from truckman@FreeBSD.org) Received: from gw.catspoiler.org (gw.catspoiler.org [75.1.14.242]) by mx1.freebsd.org (Postfix) with ESMTP id B0BB8A4; Tue, 5 Mar 2013 05:19:50 +0000 (UTC) Received: from FreeBSD.org (mousie.catspoiler.org [192.168.101.2]) by gw.catspoiler.org (8.13.3/8.13.3) with ESMTP id r255JbAu012422; Mon, 4 Mar 2013 21:19:40 -0800 (PST) (envelope-from truckman@FreeBSD.org) Message-Id: <201303050519.r255JbAu012422@gw.catspoiler.org> Date: Mon, 4 Mar 2013 21:19:37 -0800 (PST) From: Don Lewis Subject: Re: access to hard drives is "blocked" by writes to a flash drive To: phk@phk.freebsd.dk In-Reply-To: <25327.1362404670@critter.freebsd.dk> MIME-Version: 1.0 Content-Type: TEXT/plain; charset=us-ascii Cc: kostikbel@gmail.com, deeptech71@gmail.com, freebsd-current@FreeBSD.org, peter@rulingia.com, ian@FreeBSD.org X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Mar 2013 05:19:53 -0000 On 4 Mar, Poul-Henning Kamp wrote: > Content-Type: text/plain; charset=ISO-8859-1 > -------- > In message <201303040712.r247CejP008718@gw.catspoiler.org>, Don Lewis writes: > >>Prior to 231160, the syncer thread would call sync_vnode() for the >>syncer vnode of each mountpoint every 30 seconds [...] > > I agree that the lemming syncer is better, but the fundamental mistake of > only having one syncer thread is probably the root-cause in this case: > One camera-grade flash syncing may take (a lot) more than 30 seconds. That's been my opinion for a long time as well, though I think it would be better to have one thread per device to avoid syncer threads for multiple partitions on the same drive all contending for the same actuator. One complication is that the notion of a device gets pretty hazy given that we have the geom layer in between the syncer and the hardware. I'd still have a separate worklist for each mountpoint. Multiple threads would allow us to better exploit the parallelism provided by the hardware and prevent a slow drive from impacting the performance of the other drives in the system. > One mountpoint having trouble (of whatever kind) should not affect > the rest of the mountpoints. > > I'm not sure if the syncer is untangled enough that we can have > per mount-point threads yet, but as soon as we can, we should do that. I'm not aware of any fundamental issues preventing this from being implemented, though I haven't spent much time looking at recent versions of the code.