Received: by 2002:a05:7412:b10a:b0:f3:1519:9f41 with SMTP id az10csp2478000rdb; Sun, 3 Dec 2023 19:56:25 -0800 (PST) X-Google-Smtp-Source: AGHT+IHDQj8ldcOlM6tqrYFqAY+FCSgHd4i0hdodC1apKbo4K++PR85JELDxNK0ZFi7jCBgor656 X-Received: by 2002:a05:6358:914c:b0:170:17eb:b42 with SMTP id r12-20020a056358914c00b0017017eb0b42mr3201156rwr.44.1701662185538; Sun, 03 Dec 2023 19:56:25 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701662185; cv=none; d=google.com; s=arc-20160816; b=ZkTgqeF3G3CZSlDCsC4pV15aStcRsNjXM6I0sLI4jq3r8n3cACvIakibpWmJPbz3lK 7LFYfVI9LP6Ya16C+hdPvvIEwDH/2R3RLhJdaCY528uleL/9fL8O68baWzUAw3KCJBPF /jmFpvKyKqSy2S7O/LtooVjhoNhBRuLtMEoxPxYncvNRUDEPQOog6rNkeGJwPOKU9NGx XvONj6bKg88iTEo7yT34Q69e+AUJDfFKi6oyH0ExQa6+bPrIarRcPTGWE6Bex9dR9TU1 EzW5QzeSY62oaTuUnPzEy29sw61xYe3aFs719VjM2KHy/E5ypS80z408bnwWSuVnfrR4 Foyw== 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; bh=xNKUQpE6ACEyF1q91AK5Pa8cyyFRcdXFb2KIn9j+Qic=; fh=aLvFAmyj3t9eWJU+PsFUAd89R+u6Ho3CsQ3ZmqoH0wg=; b=jrm3L29tnrA1ksX5m/SGN8cU1yIfXIxzQTGGEq7d5shxGkH31NKMBtyk9jvGHoYaRw YgtFUX7XZTVw9h+v/F6witiJKKnDuVOXkA7FssBj2N9maLBdsCK6+jJFYeTL5Fp7yS3L bHaTQ1bEDwP9d8Jalgcmy6mbQQBgkD4IEbNW80Vc/GNprshKbxKMcLv71atjNSvdlDP3 TKXgWZ+Z18tmHEcVIETQoOqPLNtHJCU2T0ihNwCXbJNjDlFESjrsxx+kcAXyDNtgF1NS TobSnQrpNAamZq1XAEXX7aZsOv1FXIB0Vt/mrurOf3niPuzhDRP9biitg9orU3i73V4b fuUA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=ZTDOdNL4; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from morse.vger.email (morse.vger.email. [2620:137:e000::3:1]) by mx.google.com with ESMTPS id a23-20020a63e417000000b005b8f24e6525si7121108pgi.81.2023.12.03.19.56.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 03 Dec 2023 19:56:25 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 as permitted sender) client-ip=2620:137:e000::3:1; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=ZTDOdNL4; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by morse.vger.email (Postfix) with ESMTP id 68B1380725E9; Sun, 3 Dec 2023 19:56:23 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at morse.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229869AbjLDD4H (ORCPT + 99 others); Sun, 3 Dec 2023 22:56:07 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41360 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229510AbjLDD4G (ORCPT ); Sun, 3 Dec 2023 22:56:06 -0500 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7D296CC for ; Sun, 3 Dec 2023 19:56:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1701662172; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=xNKUQpE6ACEyF1q91AK5Pa8cyyFRcdXFb2KIn9j+Qic=; b=ZTDOdNL4Ej95SNEAK13RgkV9ESUn+iltWoD1Ud3ZXYjuESJxBQEGt1gLOMUHY79FrWe+bW zmR9mKTTVwZRTn+KCM+Xq/CGYRmTRWqyp4YVi4NPf9eQBO6MntWr1ZD3chhpTca1GgUcyM EIUCP/e5o49k8jIeTbjDh3f+5/HMayE= Received: from mimecast-mx02.redhat.com (mx-ext.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-325-z5VdyYmhPpumcRg0ll2h0w-1; Sun, 03 Dec 2023 22:56:07 -0500 X-MC-Unique: z5VdyYmhPpumcRg0ll2h0w-1 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.rdu2.redhat.com [10.11.54.8]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 988FF3803515; Mon, 4 Dec 2023 03:56:06 +0000 (UTC) Received: from fedora (unknown [10.72.120.8]) by smtp.corp.redhat.com (Postfix) with ESMTPS id C4215C1596F; Mon, 4 Dec 2023 03:55:55 +0000 (UTC) Date: Mon, 4 Dec 2023 11:55:50 +0800 From: Ming Lei To: John Garry Cc: axboe@kernel.dk, kbusch@kernel.org, hch@lst.de, sagi@grimberg.me, jejb@linux.ibm.com, martin.petersen@oracle.com, djwong@kernel.org, viro@zeniv.linux.org.uk, brauner@kernel.org, chandan.babu@oracle.com, dchinner@redhat.com, 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-api@vger.kernel.org Subject: Re: [PATCH 02/21] block: Limit atomic writes according to bio and queue limits Message-ID: References: <20230929102726.2985188-1-john.g.garry@oracle.com> <20230929102726.2985188-3-john.g.garry@oracle.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.8 X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on morse.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (morse.vger.email [0.0.0.0]); Sun, 03 Dec 2023 19:56:23 -0800 (PST) On Mon, Dec 04, 2023 at 11:19:20AM +0800, Ming Lei wrote: > On Fri, Sep 29, 2023 at 10:27:07AM +0000, John Garry wrote: > > We rely the block layer always being able to send a bio of size > > atomic_write_unit_max without being required to split it due to request > > queue or other bio limits. > > > > A bio may contain min(BIO_MAX_VECS, limits->max_segments) vectors, > > and each vector is at worst case the device logical block size from > > direct IO alignment requirement. > > Both unit_max and unit_min are applied to FS bio, which is built over > single userspace buffer, so only the 1st and last vector can include Actually it isn't true for pwritev, and sorry for the noise. Thanks, Ming