From owner-svn-src-all@freebsd.org Sun Dec 10 03:14:58 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A99AFE80480; Sun, 10 Dec 2017 03:14:58 +0000 (UTC) (envelope-from markjdb@gmail.com) Received: from mail-pl0-x232.google.com (mail-pl0-x232.google.com [IPv6:2607:f8b0:400e:c01::232]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 2025119C6; Sun, 10 Dec 2017 03:14:56 +0000 (UTC) (envelope-from markjdb@gmail.com) Received: by mail-pl0-x232.google.com with SMTP id g2so2597321pli.8; Sat, 09 Dec 2017 19:14:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=VgoKQQNygNbipe5/Qwqo49osMK8Zazys81TWfOPqkWU=; b=AI8rT8IRoaxsn8m+of9kxEKuMYezllM9+WhrBLM5uHfKOz2gxuTQtDSrfBABfcGcfe tVgkkVWE2TaSEBqsEGxI58urN+VZZcT9hATJe7f8+TwrFhtTw8xoK/vluBFgE/yZQMEE 3IYG5IDQZGFF9fEm2So7LGfBakkJ3kpc84hy4gP0hu3XnC5DrZS/ff6Z+ZQgLT9wNOuO olCl76c0aKcuB/cWd9KKEvQJFEO8u9dROEuyHh5y3Dms0zmWWh+Mp3/PAC5TmGMixrkk GDJ3lQH+Kysw3cXBiIH3ampa9hGdUrJqyDIW1nYJriP44keOefKJTO+gtjb09/O7Fp4Y Y2VQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :references:mime-version:content-disposition:in-reply-to:user-agent; bh=VgoKQQNygNbipe5/Qwqo49osMK8Zazys81TWfOPqkWU=; b=rxvE6ZjWBBgKqKOn3ZsJv3LrFyBJAju9lTKXT77H8kphzqpq9beME4B0hk+IxnadMN /cUj4JX+8yOycYSRhLvaQgor6WZ5bhT8UcqvLlgBYZ/1doVheryZIHEay6izs96DcRPA 9DCR8FJVkw+s+RJH8NY9MSFD5RRcIegMNqNe6e/lzBdls5BRDnL2IPxCR1UXKioeqgeJ QWc0A4GFCcRAJlrpsLt0ybkmLPmJuVjVO/Iq6qgI9xGYqQj0z19dttxUGS0KbqR2LTgn SOqHtlzge05NktsUe3eLt7psNP5v0FVj2jcD+xhYLRIKqxds71HwzGCJutbEynZiS5ge G5rw== X-Gm-Message-State: AKGB3mIAfKrAodwbZo26TP1Vs78hBSt/Ti2YA2Q/yA+VTGWCVms046Ph FwariFbB3Ltf4XYNpK1xx87BRQ== X-Google-Smtp-Source: AGs4zMZUas6Zs1pcfvdedkOHUOhFO3mmRbGfBa9wwwpg+RCHbPrhDKqH8XkHk61n/yuBO+vYJYdmUQ== X-Received: by 10.159.230.3 with SMTP id u3mr21351882plq.2.1512875694339; Sat, 09 Dec 2017 19:14:54 -0800 (PST) Received: from raichu (toroon0560w-lp140-01-69-159-38-22.dsl.bell.ca. [69.159.38.22]) by smtp.gmail.com with ESMTPSA id t75sm18156738pgc.12.2017.12.09.19.14.52 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 09 Dec 2017 19:14:53 -0800 (PST) Sender: Mark Johnston Date: Sat, 9 Dec 2017 22:14:50 -0500 From: Mark Johnston To: Warner Losh Cc: src-committers , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Subject: Re: svn commit: r326731 - head/sys/ufs/ffs Message-ID: <20171210031450.GB15275@raichu> References: <201712091544.vB9FiVUI096790@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.1 (2017-09-22) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 10 Dec 2017 03:14:58 -0000 On Sat, Dec 09, 2017 at 07:36:59PM -0700, Warner Losh wrote: > On Sat, Dec 9, 2017 at 11:03 AM, Andriy Gapon wrote: > > > On 09/12/2017 17:44, Mark Johnston wrote: > > > Some GEOMs do not appear to handle BIO_ORDERED correctly, meaning that > > the > > > barrier write may not work as intended. > > > There's a few places we send down a BIO_ORDERED BIO_FLUSH command > (see softdep_synchronize for one). Will those matter? Some classes have separate handling for BIO_FLUSH, so it depends. I think gmirror's handling is buggy independent of BIO_ORDERED: g_mirror_start() sends BIO_FLUSH commands directly to the mirrors, while reads and writes are queued for handling by the gmirror worker thread. So as far as I can tell, a BIO_WRITE which arrives at the gmirror provider before a BIO_FLUSH might be sent to the mirrors after that BIO_FLUSH. I would expect BIO_FLUSH to implicitly have something like release semantics, i.e., a BIO_FLUSH shouldn't be reordered with a BIO_WRITE that preceded it. But I might be misunderstanding. > As I've noted elsewhere: I'd really like to kill BIO_ORDERED since it has > too many icky effects (and BIO_FLUSH + BIO_ORDERED isn't guaranteed to do, > well, anything since it can turn into a NOP in a number of places. Plus > many of the implementations of BIO_ORDERED assume the drive is like SCSI > and you just set the right tag to make it 'ordered'. For ATA we issue a non > NCQ command, which is a full drain of outstanding commands, send this > command, then start them again which really shuts down the parallelism we > implemented NCQ for :(. We do similar for NVME which is even worse. There > we have multiple submission queues in the hardware. To simulated it, we do > a similar drain, but that's going to get in the way as we move to NUMA and > systems where we try to do the I/O entirely on one CPU (both submission and > completion) and ordered I/O is guaranteed lock contention. Independent of this, it doesn't really look like we have any way of handling write errors when dependencies are enforced using BIO_ORDERED. In the case of the babarrierwrite() consumer in FFS, what happens if the inode block write fails due to a transient error, but the following CG update succeeds?