From owner-freebsd-geom@freebsd.org Fri Nov 24 14:58:05 2017 Return-Path: Delivered-To: freebsd-geom@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 34698DE856C; Fri, 24 Nov 2017 14:58:05 +0000 (UTC) (envelope-from scottl@samsco.org) Received: from out4-smtp.messagingengine.com (out4-smtp.messagingengine.com [66.111.4.28]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 046CA77CEF; Fri, 24 Nov 2017 14:58:04 +0000 (UTC) (envelope-from scottl@samsco.org) Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id 498B620C6A; Fri, 24 Nov 2017 09:57:58 -0500 (EST) Received: from frontend1 ([10.202.2.160]) by compute6.internal (MEProxy); Fri, 24 Nov 2017 09:57:58 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsco.org; h=cc :content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-sender :x-me-sender:x-sasl-enc; s=fm1; bh=qVIuYEAsfpjDy6GFHeaqmYUXQPio2 uVChaJc9Aeq8Os=; b=v12oJ9CWdrq/ywPFKeZNkEVXl44tShaEcGNEDtUctXBOD 6GuZSe3fcFw0J69JaTrFf//o0WtjReDC5OEdf7fhCftRb/7wjUnYDsVv1AoB5oAN +h89BrWtYsC/e+hszmFr5+KN34hbdP/y0XAaBlOGMJoXPMziGMigoxm4l+ol9n87 p1iHdq9ABoD4jGFB/2BiHNfGBpRIfl+us8gWrUpDXLoJiQvkGQHwVWIhXfdRti7l uptZnVMxkoQ3qexTdGZo5YxTVPHG938ohoMbqiNslP8A2TficFtezumEq21E4zDG 9ItPZbW0BTlJ9YjLV2u2k+OOm7jMURWGTIdCJVNnA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; bh=qVIuYE AsfpjDy6GFHeaqmYUXQPio2uVChaJc9Aeq8Os=; b=j6q8dcfIr5Qevxq0taQVzK 9EPL3kDNzXJ7jvrkSjOmhxxuS07mrLbq9iOh7jehiUnqooJSuTxMExb4W5HVWUKt BzKqvskYxR1m07E5wF3N75utkhyNDfhpGPCWyiHfrEaOUNmu1PwHkPRE14Otym2h rMu3yQoBhC/s9uEa6T/fCVNkWRDnLkorBFzcRtgS1U+3XsGUJfZwXGknPHia8N+4 WYoIemhfWKEVC/G2kaVnT30pXNPX/kPxN/OrIW/4ouxPt8eRwNblT9mz9ZLMtdli 6UMnssR2IBlHFhbjxHD/xwFFRu9PpwzzK/NWQiWwjvD4BuQ8ER6SO2bvySWFBo0g == X-ME-Sender: Received: from [192.168.0.103] (unknown [161.97.249.191]) by mail.messagingengine.com (Postfix) with ESMTPA id C09497F35E; Fri, 24 Nov 2017 09:57:57 -0500 (EST) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 11.1 \(3445.4.7\)) Subject: Re: add BIO_NORETRY flag, implement support in ata_da, use in ZFS vdev_geom From: Scott Long In-Reply-To: <64f37301-a3d8-5ac4-a25f-4f6e4254ffe9@FreeBSD.org> Date: Fri, 24 Nov 2017 07:57:55 -0700 Cc: Warner Losh , FreeBSD FS , freebsd-geom@freebsd.org Content-Transfer-Encoding: quoted-printable Message-Id: <39E8D9C4-6BF3-4844-85AD-3568A6D16E64@samsco.org> References: <391f2cc7-0036-06ec-b6c9-e56681114eeb@FreeBSD.org> <64f37301-a3d8-5ac4-a25f-4f6e4254ffe9@FreeBSD.org> To: Andriy Gapon X-Mailer: Apple Mail (2.3445.4.7) X-BeenThere: freebsd-geom@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: GEOM-specific discussions and implementations List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Nov 2017 14:58:05 -0000 > On Nov 24, 2017, at 6:34 AM, Andriy Gapon wrote: >=20 > On 24/11/2017 15:08, Warner Losh wrote: >>=20 >>=20 >> On Fri, Nov 24, 2017 at 3:30 AM, Andriy Gapon > > wrote: >>=20 >>=20 >> https://reviews.freebsd.org/D13224 = >>=20 >> Anyone interested is welcome to join the review. >>=20 >>=20 >> I think it's a really bad idea. It introduces a 'one-size-fits-all' = notion of >> QoS that seems misguided. It conflates a shorter timeout with don't = retry. And >> why is retrying bad? It seems more a notion of 'fail fast' or so = other concept. >> There's so many other ways you'd want to use it. And it uses the same = return >> code (EIO) to mean something new. It's generally meant 'The lower = layers have >> retried this, and it failed, do not submit it again as it will not = succeed' with >> 'I gave it a half-assed attempt, and that failed, but resubmission = might work'. >> This breaks a number of assumptions in the BUF/BIO layer as well as = parts of CAM >> even more than they are broken now. >>=20 >> So let's step back a bit: what problem is it trying to solve? >=20 > A simple example. I have a mirror, I issue a read to one of its = members. Let's > assume there is some trouble with that particular block on that = particular disk. > The disk may spend a lot of time trying to read it and would still = fail. With > the current defaults I would wait 5x that time to finally get the = error back. > Then I go to another mirror member and get my data from there. There are many RAID stacks that already solve this problem by having a = policy of always reading all disk members for every transaction, and throwing = away the sub-transactions that arrive late. It=E2=80=99s not a policy that is = always desired, but it serves a useful purpose for low-latency needs. > IMO, this is not optimal. I'd rather pass BIO_NORETRY to the first = read, get > the error back sooner and try the other disk sooner. Only if I know = that there > are no other copies to try, then I would use the normal read with all = the retrying. >=20 I agree with Warner that what you are proposing is not correct. It = weakens the contract between the disk layer and the upper layers, making it less = clear who is responsible for retries and less clear what =E2=80=9CEIO=E2=80=9D means. = That contract is already weak due to poor design decisions in VFS-BIO and GEOM, and Warner and I are working on a plan to fix that. =20 Scott