Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp14095890pxu; Mon, 4 Jan 2021 12:33:32 -0800 (PST) X-Google-Smtp-Source: ABdhPJwgxWBuRiEIayc6i6FrJfj8OnNf+xvpoxHgZZqe0sggMAUdum4PLwgq04LF+wZb/kEKoo6v X-Received: by 2002:aa7:d846:: with SMTP id f6mr71927000eds.55.1609792412613; Mon, 04 Jan 2021 12:33:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1609792412; cv=none; d=google.com; s=arc-20160816; b=kn780tmQJRcf0K8u9rM8d6Ekq2yBM4Ulzo8sje5ClrvjZikgi4+tcTEox4sqU5IZlY 4aP9RBB2/fhdww+rW5F+zcphvv2CHHl19PNJ0wbQy8GuctChGfLka1kIM4f+QhW3iDB9 wDrPrXT27yZKA9TGbS3I7IUcLrsxPSKZ8tJP7WOJTQsiOfol0ppqfjFnpucuhnp3IdyN Ew+0mND7vGn2q3qfAohieoB/0wDf1CU9Z8wrweWrQaks9/SovbbuCQL88zsGVxH9bxbV TmCLz0zecFt531w9CiiHJapzV03LGuvDCFckXY6Cf8aaQm7Hwf7a/6yRezurWPkXYY+y uPLg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature :dkim-signature; bh=L4o1gT+9Nmi0578JQUpjoRZokjP2JxKpsVmdouqDL2Y=; b=y7h4HeyuT7fzd3NhxfpuywOPVZCOXMJcQuU4DN7HiNfLr/z0v3ZE4U3LNQS2tKM1So Cm6+L3KBCqU3vzpTP17ZfodRa0RSWlSVwgyq3c44ATVdTl86W7ndl7sUI6oSmS8FzzhO h2+M5nbrkulBpDi2qgnlgnsIRiWNO6+i2425PJM80Ihv8Hu1FjKJdbZ0Vhgw7IoAkuOM rhPvK8a9AcvjX7e7QsDs0S+j9zPBsHqHSrPninFyALPne57MJobHvjJ58F3HD1ZEx5sq kErAs2XAE03TRhDLohdJENo+tsf6IZfiue2/j8hhFJrLphJWtmREiKOhbCgLWqY+b24S sxCw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@anarazel.de header.s=fm3 header.b=VGQ0HerE; dkim=pass header.i=@messagingengine.com header.s=fm1 header.b=glCIRr71; 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 r26si33707470edi.245.2021.01.04.12.33.09; Mon, 04 Jan 2021 12:33:32 -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=@anarazel.de header.s=fm3 header.b=VGQ0HerE; dkim=pass header.i=@messagingengine.com header.s=fm1 header.b=glCIRr71; 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 S1726168AbhADUad (ORCPT + 99 others); Mon, 4 Jan 2021 15:30:33 -0500 Received: from out1-smtp.messagingengine.com ([66.111.4.25]:40677 "EHLO out1-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725840AbhADUad (ORCPT ); Mon, 4 Jan 2021 15:30:33 -0500 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.nyi.internal (Postfix) with ESMTP id C60945C01B2; Mon, 4 Jan 2021 15:29:26 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute4.internal (MEProxy); Mon, 04 Jan 2021 15:29:26 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=anarazel.de; h= date:from:to:cc:subject:message-id:references:mime-version :content-type:in-reply-to; s=fm3; bh=L4o1gT+9Nmi0578JQUpjoRZokjP 2JxKpsVmdouqDL2Y=; b=VGQ0HerEoQmkJXMmFRbzzU4+J1AoRwwt0qwyTay2ZSx 5HK8iQdhi641M01S7QEONTthzMoXmjPKqQatTRjlvKi7A/Hiqsd3dGS4v4bXT3KU Tzc9QwOTT3K2km12B/zoRjPIzrSiIb6j0xxKqhYoYNnk4fj/aI82Zypm5hpHVuD0 shsyxpjpPbyrWjcDPDy+H5sv2oyRdI/UYtyP7Qhms7WHeZg+7jmRCD0oeipwwpy6 PGTXWsa7z0f9oOB/NeTh6v+Fph/FOuulVX1hNilaQ6sSR11KnEAUC8A9kifHxXu/ mHxNLdm5AgOQZ+qQv+f74sC9CXSuwz8R8cMaNyIxYBA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; bh=L4o1gT +9Nmi0578JQUpjoRZokjP2JxKpsVmdouqDL2Y=; b=glCIRr71LLSuL9ADgG9Xa1 wtKFMKWtvFzUdYzJotxLLMBrnA/gosHywKpMb6uBrjXqdFdvccb91ty5xJnDJpHw uOXe7mZ83fSingi18PcsKVyAYW4zjDwNVZUCvEKcz6QXA40j5WOdBiup66qFZYpQ u9NgR/zy9vZWYqYtGFzovtlK3ZoRV0WTGQelBzLXljoawpb+Oo9qKMLm6QS8e8cs UUc1A5LUG+pE4lD2XqIiaSAwQ4nSOXbn51Jipri+JrxYxEXJLplKk3kTmVwSgLKi qF2ZWx5QLOVFagcqkEOWBvyfXXZYeQBGzQIfKleq2f0tjubOlmUqizFuOIXGFhzg == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedujedrvdeffedgudeflecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecunecujfgurhepfffhvffukfhfgggtuggjsehttd ertddttddvnecuhfhrohhmpeetnhgurhgvshcuhfhrvghunhguuceorghnughrvghssegr nhgrrhgriigvlhdruggvqeenucggtffrrghtthgvrhhnpedukefhkeelueegveetheelff ffjeegleeuudelfeefuedtleffueejfffhueffudenucfkphepieejrdduiedtrddvudej rddvhedtnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomh eprghnughrvghssegrnhgrrhgriigvlhdruggv X-ME-Proxy: Received: from intern.anarazel.de (c-67-160-217-250.hsd1.ca.comcast.net [67.160.217.250]) by mail.messagingengine.com (Postfix) with ESMTPA id 3799D240057; Mon, 4 Jan 2021 15:29:26 -0500 (EST) Date: Mon, 4 Jan 2021 12:29:24 -0800 From: Andres Freund To: Theodore Ts'o , Matthew Wilcox Cc: linux-fsdevel@vger.kernel.org, linux-xfs@vger.kernel.org, linux-ext4@vger.kernel.org, linux-block@vger.kernel.org Subject: Re: fallocate(FALLOC_FL_ZERO_RANGE_BUT_REALLY) to avoid unwritten extents? Message-ID: <20210104202924.ugwjnbo376t3jad2@alap3.anarazel.de> References: <20201230062819.yinrrp6uwfegsqo3@alap3.anarazel.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org Hi, On 2021-01-04 14:17:05 -0500, Theodore Ts'o wrote: > One thing to note is that there are some devices which support a write > zeros operation, but where it is *less* performant than actually > writing zeros via DMA'ing zero pages. Yes, that's insane. > Unfortunately, there are a insane devices out there.... That doesn't surprise me at all, unfortunately. I'm planning to send a proposal to allow disabling a device's use of fua for similar reasons... > That doesn't meant that your proposal shouldn't be adopted. But it > would be a good idea to have some kind of way to either allow some > kind of tuning knob to disable the user of zeroout (either in the > block device, file system, or in userspace), and/or some kind of way > to try to automatically figure out whether using zeroout is actually a > win, since most users aren't going to be up to adjusting a manual > tuning knob. A block device know seems to make sense to me. There already is /sys/block/*/queue/write_zeroes_max_bytes it seems like it could make sense to add a sibling entry to allow tuning that? Presumably with a quirks (as suggested by Matthew) to choose a sensible default? It's not quite analogous, but there's for max_hw_sectors_kb/max_sectors_kb and discard_max_bytes / discard_max_hw_bytes, and it seems like something vaguely in that direction could make sense? Greetings, Andres Freund