Received: by 2002:a05:7412:8d1c:b0:fa:4c10:6cad with SMTP id bj28csp449731rdb; Wed, 17 Jan 2024 07:02:30 -0800 (PST) X-Google-Smtp-Source: AGHT+IGYzLNtwwGg/5zmCas7t6TR/o1LyE2bOl30susD2pQmcJmbNVnUkQujjv+0ZjRBOFYW6gfW X-Received: by 2002:a05:622a:1746:b0:42a:9e9:7625 with SMTP id l6-20020a05622a174600b0042a09e97625mr2329315qtk.95.1705503746034; Wed, 17 Jan 2024 07:02:26 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1705503746; cv=pass; d=google.com; s=arc-20160816; b=TpE6luP3rt8R4k3lU+FjsVwWFP8FkDWkZPKQYiA7uVVDkLqW2DA7R4WJ4BAy8fm7Rs SgI8aq2o/1EJCY4KSt/MAQoVxVnlP3efbrbpI1SsFwlCVladlWUNrhv4Ak9w5LWn2smP BsSJwL0JN6zG9VZu9eOTF02qyhKT/JBz+aSzLOPWLUnX1lVXFGD9JcZU4iYBaoQCEWHK WJlWEGFy2cogKFz2aU83g/xDjebyCYNstnlctQlujawBrUtTi3Mq0Wdo/Kb/jZSoT+Ip dA7l6wVfvuf5S+XUKufdzptlceJHk1C/AdFyNsD5UhoDhk2/iyZFodT1kjt+dhj51BwT 7IBQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=user-agent:in-reply-to:content-disposition:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:references :message-id:subject:cc:to:from:date; bh=mBsCDU9amg1y2J7SZXa1OA2kUWANoE/tPQb8ew9OZWM=; fh=pRFDb1qzPVEVLkPLiwPjjL6kEjGObSneCb7bU5CT3Q8=; b=uKq7dN6hop6mkZfJsqlFU+cIGwlTDiDxDw1tJv6hEuCWMmCD7FLJeJ2TaOtx40WdzZ v10ybUiovFaWKXh1RnpPgUb0WO4cskB7BTeZRA09Rqui+cMIRphaPzF7rDNbVef9GSA5 5v2sUofEFO5QagITXQ47xXkZViZse8uh2t9eh2rw+UrmA5xO5Wz3VO5Pz5RNuaKVIEMa dqSJDFotg+vZt00tF+6pM6GlRfmY/JTHoRaPL3LDlcM1hygMgo1/sksUFKvSqMABRBln sC/uhlJ5fXmMwRGnOLT4ExBsC1SgyqyfTosX5gOkxT3YgydCfWSFOn5dKNVwnw56Olse E34g== ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=lst.de); spf=pass (google.com: domain of linux-kernel+bounces-29118-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-29118-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id d4-20020ac85ac4000000b0042a14f94776si101041qtd.331.2024.01.17.07.02.25 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 17 Jan 2024 07:02:26 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-29118-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=lst.de); spf=pass (google.com: domain of linux-kernel+bounces-29118-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-29118-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id C03CE1C21AB1 for ; Wed, 17 Jan 2024 15:02:25 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 34B3C219F5; Wed, 17 Jan 2024 15:02:11 +0000 (UTC) Received: from verein.lst.de (verein.lst.de [213.95.11.211]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E701721347; Wed, 17 Jan 2024 15:02:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=213.95.11.211 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705503730; cv=none; b=kCmqLwbD9xuENZ03d9duu+EVtrJLGyD8EW9GCFffS5L+m1dmaEuQ5iNkbmAN8Uz7rKXkxCMR5sLtEOJpeUuch0MrHgKvj+L4JhIb++ZoF3LZ4oUdMZGzZqt+NZNnSLYTijnD5RKMeQ2Uuu6+XNLqutVDb2CdmrS+sgT9KOkv2/0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705503730; c=relaxed/simple; bh=InjtWWHIK+dxg9+ObW7eBrA9Bb+Q/V/aSLm4A24XvJo=; h=Received:Date:From:To:Cc:Subject:Message-ID:References: MIME-Version:Content-Type:Content-Disposition:In-Reply-To: User-Agent; b=IHCP/xoz2BGkkjj42PPn6NVwAcbqKkZb6QyMdvRhuO7d0zn5xgni6odbG92llKC2ATOeGCXfG047qzXEW52JwiAokeORBnlPo5BUpATF5tr7vn+zy3X3TukBG0RDiqf1OcH3vgXIL8BZ0IrDrx19h+buMuNFm9/z3YgsNAbm+jc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=lst.de; spf=pass smtp.mailfrom=lst.de; arc=none smtp.client-ip=213.95.11.211 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=lst.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=lst.de Received: by verein.lst.de (Postfix, from userid 2407) id 4135968C7B; Wed, 17 Jan 2024 16:02:01 +0100 (CET) Date: Wed, 17 Jan 2024 16:02:00 +0100 From: Christoph Hellwig To: John Garry Cc: Christoph Hellwig , "Darrick J. Wong" , axboe@kernel.dk, kbusch@kernel.org, sagi@grimberg.me, jejb@linux.ibm.com, martin.petersen@oracle.com, viro@zeniv.linux.org.uk, brauner@kernel.org, dchinner@redhat.com, jack@suse.cz, linux-block@vger.kernel.org, linux-kernel@vger.kernel.org, linux-nvme@lists.infradead.org, linux-xfs@vger.kernel.org, linux-fsdevel@vger.kernel.org, tytso@mit.edu, jbongio@google.com, linux-scsi@vger.kernel.org, ming.lei@redhat.com, jaswin@linux.ibm.com, bvanassche@acm.org Subject: Re: [PATCH v2 00/16] block atomic writes Message-ID: <20240117150200.GA30112@lst.de> References: <20231219151759.GA4468@lst.de> <20231221065031.GA25778@lst.de> <20231221121925.GB17956@lst.de> <20231221125713.GA24013@lst.de> <9bee0c1c-e657-4201-beb2-f8163bc945c6@oracle.com> <20231221132236.GB26817@lst.de> <6135eab3-50ce-4669-a692-b4221773bb20@oracle.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <6135eab3-50ce-4669-a692-b4221773bb20@oracle.com> User-Agent: Mutt/1.5.17 (2007-11-01) On Tue, Jan 16, 2024 at 11:35:47AM +0000, John Garry wrote: > As such, we then need to set atomic write unit max = min(queue max > segments, BIO_MAX_VECS) * LBS. That would mean atomic write unit max 256 * > 512 = 128K (for 512B LBS). For a DMA controller of max segments 64, for > example, then we would have 32K. These seem too low. I don't see how this would work if support multiple sectors. > > Alternative I'm thinking that we should just limit to 1x iovec always, and > then atomic write unit max = (min(queue max segments, BIO_MAX_VECS) - 1) * > PAGE_SIZE [ignoring first/last iovec contents]. It also makes support for > non-enterprise NVMe drives more straightforward. If someone wants, they can > introduce support for multi-iovec later, but it would prob require some > more iovec length/alignment rules. Supporting just a single iovec initially is fine with me, as extending that is pretty easy. Just talk to your potential users that they can live with it. I'd probably still advertise the limits even if it currently always is 1.