From owner-freebsd-hackers@freebsd.org Tue Dec 8 19:58:53 2015 Return-Path: Delivered-To: freebsd-hackers@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 DDC0D9D4B3E for ; Tue, 8 Dec 2015 19:58:53 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from mail-pa0-x22b.google.com (mail-pa0-x22b.google.com [IPv6:2607:f8b0:400e:c03::22b]) (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 A58821EC2 for ; Tue, 8 Dec 2015 19:58:53 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: by pacdm15 with SMTP id dm15so16906418pac.3 for ; Tue, 08 Dec 2015 11:58:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=sender:subject:mime-version:content-type:from:in-reply-to:date:cc :message-id:references:to; bh=5nkXaeQP2gLbNfQUV5ZPhSoSccsKFvPkxSHB6s9hBY8=; b=ZfRR6YwF0mo0AVkbTJND+gZbCvleoEGtgwLaDqAuC5XPklztpR2341SETLQnJp3Bng UaGeALzKNDDp1+u9yp3qd/fxbw+Fq+jFmi/7Lwo3ZL6uC2RtRHBne/wNJ7gTK5kfWSCV zjxp3Y6zsrfpPuGCiHMAqYIr4SyecsNRMgc1gunwajCEvsRfJh7mN0k6trkxYf9lQr1A XiNvHkbvMgz15wxbBXnsaBrADmFdSGUI5B+w+05q6/lnJ2t5zLcV2Oqr4Zzme66F3Yj4 cJbJXcIcF6wWq4sSGgzW15yVhJgxybGTGmH9Ct9g6yXZAREmmOJ7aYCJOxf9IPwOgGA9 1jXQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:subject:mime-version:content-type:from :in-reply-to:date:cc:message-id:references:to; bh=5nkXaeQP2gLbNfQUV5ZPhSoSccsKFvPkxSHB6s9hBY8=; b=c8Ivi5DMCHOLd7gSIWRX6wUx2gkfqs56VrfulRTXiS6q/uBBJCN4v+Hht6EJaVBkLW 1KjTDA8wCqrN85N+StLabaNUUvkSfHL+ogjxNF2Y2btLgv/w5bFTGu9wwLO9d5b4bhz2 h7nfoAADeWKqmfwLh3Zi0eYdRbDsHaaRt74jMEQOUy2y20c/l6kFx5d0AQJ8Ys6xDnYZ RPJBb2094alA7UDa+0v3JZlHl899xNNyIvBWU4X8yv/KwO7B6KzuC4jseCd9S5D8mlyz 8TItLmnQnDUJ3GOFrHMGdm7CIAsi08Go+z+G2h2cmR5jVJI5DDEZWKW4fmRC5l69Lrm1 qsiw== X-Gm-Message-State: ALoCoQmMBd97632F+9ooKSXKAvE6aYD6W6nbct6X2uHkIn1CTKQhxhWkOVKOzviWqpE1ZyBt9xnLaprJnbh0vgurkpIfynr1gw== X-Received: by 10.66.248.106 with SMTP id yl10mr2471387pac.140.1449604733102; Tue, 08 Dec 2015 11:58:53 -0800 (PST) Received: from ?IPv6:2601:280:4900:3700:4d3f:8eba:ea86:7700? ([2601:280:4900:3700:4d3f:8eba:ea86:7700]) by smtp.gmail.com with ESMTPSA id e20sm6503645pfb.1.2015.12.08.11.58.51 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 08 Dec 2015 11:58:52 -0800 (PST) Sender: Warner Losh Subject: Re: DELETE support in the VOP_STRATEGY(9)? Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2104\)) Content-Type: multipart/signed; boundary="Apple-Mail=_EB5456C4-B287-466A-AA13-FAEC4F84D4BB"; protocol="application/pgp-signature"; micalg=pgp-sha512 X-Pgp-Agent: GPGMail 2.5.2 From: Warner Losh In-Reply-To: <868u54radx.fsf@desk.des.no> Date: Tue, 8 Dec 2015 12:58:49 -0700 Cc: "freebsd-hackers@freebsd.org" , Steven Hartland Message-Id: References: <201512052002.tB5K2ZEA026540@chez.mckusick.com> <86poyhqsdh.fsf@desk.des.no> <86fuzdqjwn.fsf@desk.des.no> <864mfssxgt.fsf@desk.des.no> <86wpsord9l.fsf@desk.des.no> <566726ED.2010709@multiplay.co.uk> <0DB97CBA-4DC3-4D52-AE9D-54546292D66F@bsdimp.com> <86d1ugrb7j.fsf@desk.des.no> <868u54radx.fsf@desk.des.no> To: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= X-Mailer: Apple Mail (2.2104) X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 08 Dec 2015 19:58:54 -0000 --Apple-Mail=_EB5456C4-B287-466A-AA13-FAEC4F84D4BB Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 > On Dec 8, 2015, at 12:46 PM, Dag-Erling Sm=C3=B8rgrav = wrote: >=20 > Warner Losh writes: >> Dag-Erling Sm=C3=B8rgrav writes: >>> My point is that it's wrong to infer anything else from >>> GEOM::candelete than the fact that BIO_DELETE requests will be >>> accepted and may or may not do something, somewhere, at some point. >>> We can easily create a different GEOM attribute which indicates that >>> seeks are essentially free, and FFS could use that instead of >>> GEOM::candelete to disable relocation. >> When this was implemented, we thought about that. But we couldn't = come >> up with any cases where you'd have one set and not the other. And = the >> actual thing you'd want isn't that seeks are free, though that's a >> good clue. The actual thing you want is to know if there's a >> performance benefit to keeping files contiguous, and the extent size >> where that stops making sense. >=20 > I'm having a hard time understanding how the fact that seeks are > essentially free is *not* a good indication that there is no benefit = to > keeping files contiguous, since keeping files contiguous is something = we > do to avoid the cost of seeking. Support for deletion, on the other > hand, is *completely* orthogonal. And my example was not taken = entirely > out of the blue: I'm sure there would be a huge market for storage > devices, whether electromechanical or solid-state, which implemented > this in hardware, along with guarantees that reallocated sectors are > truly non-recoverable. I=E2=80=99d say it=E2=80=99s not nuanced enough. Seeks may be = essentially from for SSDs, but there=E2=80=99s still some benefit to clustering writes. Only the = SSD=E2=80=99s firmware can know what units it would prefer to write things in so that it = spreads the sectors across however many banks / chips make up one unit internally that can be done in parallel. While not perfect, GEOM::candelete gives an indicate that the device = does storage management. In the vast majority of the cases in actual = hardware, this means that the actual physical media is obscured by at least one layer of indirection. Since there=E2=80=99s the layer of indirection, = assumptions about continuity are out the window. While there may be a tiny fraction where drives try to shoe-horn =E2=80=98reliable erasure=E2=80=99 into data set = management trim operations, or similar, I=E2=80=99d imagine that to get the assurances = they=E2=80=99d want from the OS and filesystems, they=E2=80=99d implement a new primitive or = attribute which would allow them to use a more robust command set to ensure when the feature is engaged it=E2=80=99s working as advertised. So using = GEOM::candelete is good enough until actual problems can be demonstrated. We can do the work then to solve the problem found with it rather than guess about = what the problems might be and design to that. And to be fair, having an additional property of =E2=80=98seeks are = nearly free=E2=80=99 would also be a good way to tell. I=E2=80=99m not convinced it is worth the = effort to add it to all the storage devices in the tree when GEOM::candelete is a good = proxy. I guess if we=E2=80=99re going to the effort, I=E2=80=99d like there to = be a richer set of data provided than just =E2=80=98seeks are nearly free=E2=80=99. Warner --Apple-Mail=_EB5456C4-B287-466A-AA13-FAEC4F84D4BB Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail -----BEGIN PGP SIGNATURE----- Comment: GPGTools - https://gpgtools.org iQIcBAEBCgAGBQJWZzZ6AAoJEGwc0Sh9sBEARw8QAJ26d8PwzKSUzP9jiOl8NP4e EA9m9EJ4DaikBfB8sndtpq6sQBh9SYBXEr8Xg+FtVmVnJuU70pp1yyepIRCWDoiH Egz7XXkhkdPiTZu6TlwjZCJuj8E+kPBJyInLURx/hsF+TkJ3wzzY2wHeOuloHkKZ uujnllF4nASDmfVxFJmWYpvvP7wlzTA4bFdzKeiF1Fdja/sXIoo/Nm744Vwb56q7 o0bDNSkVZhZLozS1nCz9tGwFq5cyZF0r20J91NnPSD3DmJ/l8dkRJ3RKIoI28cYI A3NjNVHNM4pUQE3Hafx3/H+WkN1rLaSsMOLH6J0ZSVvT5b51BqNVF844LlvGaZpy YngtZnFRrhRoJl/LaMmfSvYUw/vzvrCMpU4uOatGZq9Cq6qNAqAn2EWhe/d1MOe3 ieaa89tIN6A8CR4hgpZl0Y1lUH5DS5fuGLV72aBfDJE6pPeQmepcRQ+qbiDITFk4 I/tW7KBOMko8HbqfSEJ2w3eVAzR5pl9WbL2ChRmhcS8TYvX0McJtQqbDmTW0moFa ZkyKCl1NpBL81OsWyrMEprEq3LEN8uFARGVvftY4zhCnLCbjKqhbCv/tjzpF3TEL ZosfubJFYa/IlpLVC8sp54jDtvxyuJzOXsqxbTsGqYKmIvadJSMxKgo5PU6Yxbfs Jcx6I3DznL0mHMuJ8AQW =3ORU -----END PGP SIGNATURE----- --Apple-Mail=_EB5456C4-B287-466A-AA13-FAEC4F84D4BB--