From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 48D7BEEB56F for ; Thu, 12 Sep 2024 09:26:32 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 806A46B007B; Thu, 12 Sep 2024 05:26:31 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 7B6B86B0082; Thu, 12 Sep 2024 05:26:31 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 67DBD6B0083; Thu, 12 Sep 2024 05:26:31 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0016.hostedemail.com [216.40.44.16]) by kanga.kvack.org (Postfix) with ESMTP id 42EF16B007B for ; Thu, 12 Sep 2024 05:26:31 -0400 (EDT) Received: from smtpin24.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay04.hostedemail.com (Postfix) with ESMTP id E0C161A1D82 for ; Thu, 12 Sep 2024 09:26:30 +0000 (UTC) X-FDA: 82555555740.24.7360725 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) by imf13.hostedemail.com (Postfix) with ESMTP id BEB012000E for ; Thu, 12 Sep 2024 09:26:28 +0000 (UTC) Authentication-Results: imf13.hostedemail.com; dkim=pass header.d=infradead.org header.s=bombadil.20210309 header.b=fVxw5Dlp; dmarc=none; spf=none (imf13.hostedemail.com: domain of BATV+78b913441a3cb29668e4+7690+infradead.org+hch@bombadil.srs.infradead.org has no SPF policy when checking 198.137.202.133) smtp.mailfrom=BATV+78b913441a3cb29668e4+7690+infradead.org+hch@bombadil.srs.infradead.org ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1726133184; a=rsa-sha256; cv=none; b=Vhw23LB/o4HGxVm90fkc9cv1WyBLlHv3LXkKS6WBj+eurmoFM61cBwEa3YY3E2HILxF6a9 2DPQ5JzeJZ5E618bOl6HcOkpHoBwDi6qEe2xDz87pjv/vm48YCsYxbfbkLAyz0acjt7wVl GMiO2RFCP9c6qbMUKIVVrVyJ7k7CJyE= ARC-Authentication-Results: i=1; imf13.hostedemail.com; dkim=pass header.d=infradead.org header.s=bombadil.20210309 header.b=fVxw5Dlp; dmarc=none; spf=none (imf13.hostedemail.com: domain of BATV+78b913441a3cb29668e4+7690+infradead.org+hch@bombadil.srs.infradead.org has no SPF policy when checking 198.137.202.133) smtp.mailfrom=BATV+78b913441a3cb29668e4+7690+infradead.org+hch@bombadil.srs.infradead.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1726133184; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=qZrcBqxMalG7OXdtjJDUEBM4nS29K+nJn6GRl07zvRc=; b=dNuPRQAiB4Hla4SQnmljZc3br15Q7FEpRoYZzsnfddxOpzfRmg7R6FaXbyZnzrbnDyI2zM IRFdlbQOg/fi5O7lWxvr3UjvoRG0dlaKQEeDJACf0hQB6fnbzXUpvZIWHW39E4qUFR2K+A 78DDLtGXAxUaHtliPdRYeddLGjfXcmw= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=qZrcBqxMalG7OXdtjJDUEBM4nS29K+nJn6GRl07zvRc=; b=fVxw5DlpTKrFCQS7eG79Z01ue7 ZO11jOcrKRANRWPGQYCOGFHHwAcnkTFMRnkNKSbgKd6CBzG3yERYkfQi5MWPCYcOYRz6RxJvq60WO Ho9gvufOuaHHji/VLTH7StzYqxWI7svnsbi5GCGrr7nGXGuPZtqzo2hLoC+BYl05OBfhEk5swapk0 rsE8V+wz0+tLUdmc5AgVjFbQz3JV9FAuMIDyOSCKB1Mp51P/2zf0pG8/VF6iXdIdMfJuWsZyDM8gY +UyfbiqKo1aMxgQjZ4xszZEz1oU019LOKoD8FavkMHYA8Z9JBGuB1Bi2Wht488jDqAAp6+oeMZuxL qKfLOALQ==; Received: from hch by bombadil.infradead.org with local (Exim 4.97.1 #2 (Red Hat Linux)) id 1sog5p-0000000CWKn-3hXZ; Thu, 12 Sep 2024 09:26:25 +0000 Date: Thu, 12 Sep 2024 02:26:25 -0700 From: Christoph Hellwig To: Pavel Begunkov Cc: Christoph Hellwig , io-uring@vger.kernel.org, Jens Axboe , Conrad Meyer , linux-block@vger.kernel.org, linux-mm@kvack.org Subject: Re: [PATCH v4 8/8] block: implement async write zero pages command Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html X-Rspam-User: X-Stat-Signature: 6nabiozp3jxocjfqkuzsmkfzdhb5d9ck X-Rspamd-Queue-Id: BEB012000E X-Rspamd-Server: rspam02 X-HE-Tag: 1726133188-78210 X-HE-Meta: U2FsdGVkX18LNr3q63gJn6+E8slFrVWBuH2bNYAARRVbEIICuKGHM1OcQWkB0YTkntnGMx/GG2hF4EUDhTuRCMZ4bABfIRG66OtTC6cOYaGrflJEjYHj2aCc5rxOFg7ZFaAcIykkoroG7GTLbqL0ptoZHmpEPERFrj4Iug2TdwluIhWUCkiYsqhNZ84Tw/z+qRDCe22eR1KJEzWDl/Er9aq3E/NZMBhuyXKg8IMYsLPYRjCL3PAXxjq+yKyBi4Q787Uxrf8wxwQ00/jqsO9CqVhn8L1Tc09RSOjiMZxrpWKE6dwyyNXtVSS0w7UgcNN/PvRdLILwih+jtAZO9DnkBvy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1aQc93NaL0BMsi7Sj9yj4rwI68H+LIKotZTsf9TMWGssOfLVEFIpNZ8KAWqGlhYxjZ6/jyvPdgQynNFI3vv5yU5THF7Z4D27xtxqw== X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: On Tue, Sep 10, 2024 at 09:10:34PM +0100, Pavel Begunkov wrote: > If we expect any error handling from the user space at all (we do), > it'll and have to be asynchronous, it's async commands and io_uring. > Asking the user to reissue a command in some form is normal. The point is that pretty much all other errors are fatal, while this is a not supported for which we have a guaranteed to work kernel fallback. Kicking it off reuires a bit of work, but I'd rather have that in one place rather than applications that work on some hardware and not others. > That's a shame, I agree, which is why I call it "presumably" faster, > but that actually gives more reasons why you might want this cmd > separately from write zeroes, considering the user might know > its hardware and the kernel doesn't try to choose which approach > faster. But the kernel is the right place to make that decision, even if we aren't very smart about it right now. Fanning that out to every single applications is a bad idea. > Users who know more about hw and e.g. prefer writes with 0 page as > per above. Users with lots of devices who care about pcie / memory > bandwidth, there is enough of those, they might want to do > something different like adjusting algorithms and throttling. > Better/easier testing, though of lesser importance. > > Those I made up just now on the spot, but the reporter did > specifically ask about some way to differentiate fallbacks. Well, an optional nofallback flag would be in line with how we do that. Do you have the original report to share somewhere?