Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp2513894pxb; Mon, 18 Jan 2021 21:49:14 -0800 (PST) X-Google-Smtp-Source: ABdhPJxhprqWPxfrz6btfWiQn/2QfPJLFI8AJeTqz1g/Giod2xR3hR43OHhFn9FYMnK4Pw0QgY2B X-Received: by 2002:a17:906:dbf2:: with SMTP id yd18mr1893457ejb.45.1611035354496; Mon, 18 Jan 2021 21:49:14 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1611035354; cv=none; d=google.com; s=arc-20160816; b=x1ZsA5Up2CJzx+JqM7sH9Laqv8p+n8g6vPN/2M8nMrqmU4hpF5rO9lVjPMsUmNIeT8 OLrIURftN3AUz0ZQjcr/AthnMJ1TT4WWxwpDJGJeQli/UvLjZO117L2qWmGH5cv7C1Fs l/TdAfYewPVH2ybqsG8nI7RZBTK6goF+9PMZ5Xl/c26zomCX11UUUBjFZmzcrMDV9ofI /f1g0wT0Z/acWj5os+y2X/AgG65WsNkVMUE2G2BwCYqrhdi2QfQ1l328bT6jc1+p1V99 +OylpFG12yW81TzOTQ58xjkCgQelbDZy5OFDsvhS7+nKKR1OJ/n6PSWl4f8uF6T3gW72 uWRg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:references:to:cc:in-reply-to:date:subject :mime-version:message-id:from:dkim-signature; bh=/q04Qijbrtl7abjswNGUBJoouDR9KZ4AGaHH4rlP2KY=; b=UQWh7TN6+fX07ML4gm7E1z2Bxk74fh5sR2lrUEGLQydfoT6yGHNFT96rmIvYeesJYG 6QSD9NzKrp1m4MZCAdkCf08P1XQ8eg5Xf/2oJspNH7U7jfdXAVCRuASNfel7+N+dyvuA Lw3uKpmctzw1WpKpkFhVyW8oHeDQjwpcXbQ/CUgrnFTrzPQgEI6atnHb4b4JcYHWBBjj nEnetzzl2TUoOzkDIJOkk2JlEh1F5SfwZwvPnMSWtIKCWIb6XEq39mKnJzC9oOL4dcE8 P2t1teMp0ZvTF9r/hYmwxOimft9zKzHVAS57NwokoZaqsXo/xFd23WUU/liimf8hyqlR ruOQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@dilger-ca.20150623.gappssmtp.com header.s=20150623 header.b=r5bPJWvR; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id d14si8801965edj.545.2021.01.18.21.48.51; Mon, 18 Jan 2021 21:49:14 -0800 (PST) Received-SPF: pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@dilger-ca.20150623.gappssmtp.com header.s=20150623 header.b=r5bPJWvR; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728650AbhASDov (ORCPT + 99 others); Mon, 18 Jan 2021 22:44:51 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55192 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728573AbhASDor (ORCPT ); Mon, 18 Jan 2021 22:44:47 -0500 Received: from mail-pf1-x430.google.com (mail-pf1-x430.google.com [IPv6:2607:f8b0:4864:20::430]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 66EAAC061573 for ; Mon, 18 Jan 2021 19:44:07 -0800 (PST) Received: by mail-pf1-x430.google.com with SMTP id y205so5592568pfc.5 for ; Mon, 18 Jan 2021 19:44:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=dilger-ca.20150623.gappssmtp.com; s=20150623; h=from:message-id:mime-version:subject:date:in-reply-to:cc:to :references; bh=/q04Qijbrtl7abjswNGUBJoouDR9KZ4AGaHH4rlP2KY=; b=r5bPJWvRlFSKgksrAIbNf93/4kv/hO8kdTSG8UHzD2y8CtPRHkub6TAIv5DUTIjEeL 6Wly1efHI5tItuz3le41iA0Hi1hJ5QK7BUQ6uTp/E25J26ikBqncTDAteD9Lh/slyiNZ bWpbJTVQiQ55rgJZm7mTBeEOPfbQB5RLa1lt1q7Gh1HzruL8im1M1Y077BHS50aS1GHm lpHRm/icNGRh/VCuq4MLVyfuW0UBuwxa1Nb9LGMTJTtRB5LAXHbxymXm81T0sFCdSBk8 pFgN7HoEdpYNFxK/yA817w9NUcsi2gg+MY80fmN/4kdMwpBkpn9bnN435IrwCl2oiqbN 3pUQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:message-id:mime-version:subject:date :in-reply-to:cc:to:references; bh=/q04Qijbrtl7abjswNGUBJoouDR9KZ4AGaHH4rlP2KY=; b=erk1GSM9cltcZADlqAXtH1ir/UOXt+J0GNn0vQkFHxvpD0b+eIdWLr5bM9ysmXyYfE LGoIYhVWVuDqsUyrVb2oz1sOzGqRUWK9lq+NSiULw+tLqqY/oxXP/Lc32aa26P2AEJX9 lMNA8F96DWwDn3ytUtxJI146qZrgFhYxAEE5irJT2SLmGvMcZMF/AoFLKxG7qwYeigcU X0w5zV3jSPYAM+hSwv/IK3GVOaAeRMDGvjTnY5zWem09ijEBcRzFUicLarysBBiP0dga 3OUVrSa0eBTSk1pbPv+dv5btvqiukvTkz0BQLk810yalytVl/siGSFf0A/qp2sHmcNyE C74Q== X-Gm-Message-State: AOAM531nt2PRCZLIS22h3ndIUfLoihGRCCBTxKmsaWygNeUJ+ueftnch YaKpmJXQOUdr3h0E3SSCkj6AQQ== X-Received: by 2002:a63:1c13:: with SMTP id c19mr2563638pgc.359.1611027846835; Mon, 18 Jan 2021 19:44:06 -0800 (PST) Received: from cabot.adilger.int (S01061cabc081bf83.cg.shawcable.net. [70.77.221.9]) by smtp.gmail.com with ESMTPSA id f29sm16822840pgm.76.2021.01.18.19.44.05 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 18 Jan 2021 19:44:05 -0800 (PST) From: Andreas Dilger Message-Id: <6D9D9B4D-65E5-4993-AC08-080B677BA78E@dilger.ca> Content-Type: multipart/signed; boundary="Apple-Mail=_CF7582DE-2906-4EF2-9ED9-35596B0D02B6"; protocol="application/pgp-signature"; micalg=pgp-sha256 Mime-Version: 1.0 (Mac OS X Mail 10.3 \(3273\)) Subject: Re: fallocate(FALLOC_FL_ZERO_RANGE_BUT_REALLY) to avoid unwritten extents? Date: Mon, 18 Jan 2021 20:44:04 -0700 In-Reply-To: <6d982635-d978-e044-4cca-c140401eb0d3@scylladb.com> Cc: Andres Freund , "Darrick J. Wong" , Christoph Hellwig , linux-fsdevel@vger.kernel.org, linux-xfs@vger.kernel.org, linux-ext4@vger.kernel.org, linux-block@vger.kernel.org To: Avi Kivity References: <20201230062819.yinrrp6uwfegsqo3@alap3.anarazel.de> <20210104181958.GE6908@magnolia> <20210104191058.sryksqjnjjnn5raa@alap3.anarazel.de> <20210112181600.GA1228497@infradead.org> <20210112184339.GA1238746@infradead.org> <1C33DEE4-8BE9-4BF3-A589-E11532382B36@dilger.ca> <20210112211445.GC1164248@magnolia> <20210112213633.fb4tjlgvo6tznfr4@alap3.anarazel.de> <6d982635-d978-e044-4cca-c140401eb0d3@scylladb.com> X-Mailer: Apple Mail (2.3273) Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org --Apple-Mail=_CF7582DE-2906-4EF2-9ED9-35596B0D02B6 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii On Jan 13, 2021, at 12:44 AM, Avi Kivity wrote: >=20 > On 1/12/21 11:36 PM, Andres Freund wrote: >> Hi, >>=20 >> On 2021-01-12 13:14:45 -0800, Darrick J. Wong wrote: >>> ALLOCSP64 can only allocate pre-zeroed blocks as part of extending = EOF, >>> whereas a new FZERO flag means that we can pre-zero an arbitrary = range >>> of bytes in a file. I don't know if Avi or Andres' usecases demand = that >>> kind of flexibilty but I know I'd rather go for the more powerful >>> interface. >> Postgres/I don't at the moment have a need to allocate "written" = zeroed >> space anywhere but EOF. I can see some potential uses for more = flexible >> pre-zeroing in the future though, but not very near term. >>=20 >=20 > I also agree that it's better not to have the kernel fall back = internally on writing zeros, letting userspace do that. The assumption = is that WRITE SAME will be O(1)-ish and so can bypass scheduling = decisions, but if we need to write zeros, better let the application = throttle the rate. Writing zeroes from userspace has a *lot* more overhead when there is a = network filesystem involved. It would be better to generate the zeroes on the = server, or directly in the disk than sending GB of zeroes over the network. Cheers, Andreas --Apple-Mail=_CF7582DE-2906-4EF2-9ED9-35596B0D02B6 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP -----BEGIN PGP SIGNATURE----- Comment: GPGTools - http://gpgtools.org iQIzBAEBCAAdFiEEDb73u6ZejP5ZMprvcqXauRfMH+AFAmAGVYQACgkQcqXauRfM H+DLKQ/9GRaFCst/9Bjwd/poEF5jxdM6qxtvLh1IreNdo5xYT9CWaWcV9RGSCTud TPy82XDn/ml2FBV2XLsxyOXv5bjG89/Y1EWQpbsrF3p+mxak2+Qw/0PqL1sJSi7H kb7hVGrB16n6mLKUZpnHSMiXBl/1K8Mq3YWPY43svLd7l2zCpC6TpgzCYfxpdgid c7T9wifVH4gPz8A/PQ26MAL9oABbozDOak3ZdOJQrMWnlfqG18MtGArwAbxWG2c2 feMxx8givW6DXtxgk9OMyZYAwYrb6hGc4hK3f7r1SO6zaaCfpvUt7pupGjT15vTn ZtxHQDgb4bgb/DI5NFPxB0+0a9+oO1nW/oU6Fhccl6bwVpdtFUrCJOa1D0pRuVlU zdr4jVOCrsGmXDtPvJtWFrLuPgj8SVwuBvuPWaxWSTgZ/ADewV4lp0NhZymmmvVL FzNE1ta9Z9QO3oC+FH679/xuIAReBKmQudS9dfLgVrEhhevuRqfVWnL9fP1svK+U 85tBBYgOZDe4V5rA/c+nIhGmG37cE5y1Ei5ngaDf/jiL+V728W561dT7DYU0+CjE T3LLNhYGj991vpFZBs3jn+/87gtdilP+me2OjpFug8jyL7wFbOquhXIgdE3WLUlr wIq3T3GDX7afC3jEN8JXEoV0oZidbBUsUdCoDfLWpJ+zQdjXfY8= =imFu -----END PGP SIGNATURE----- --Apple-Mail=_CF7582DE-2906-4EF2-9ED9-35596B0D02B6--