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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id C5B27C433EF for ; Wed, 23 Mar 2022 02:10:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=+VhNzK/4rqz9BBZ+NUufmtY5hd4LqSi4mcImA5YtOoE=; b=jW/7lbTVfjg8Z7Rfpz9u2Q+X+A l9qbIedJCgCI8C71mr/0fqrItJyvKTvdCx3urKUiXkXish9IWzx+T9+k84QkwlpxR334UgZdwDxlc u8ZuGTkvLmSPFtdUR45hLAL/+P+okdI1yZetCWtiaFtGLiTrJsteI95bshERpLiZtp1v9RYZvFkyA L7Kdwi97oUMeTGEEQHUSgCKrv+EHsy6o3quQECXQdENup9AcRAZQVTuimStoMBwk64YlQpaeAfuQ0 vGVEAO6bqSa8EQLzFkExv0jPs6goZqbDVO0hjeqSiVDe3mIzf3/UdLIPZWeY7aoz1KOBDrTWTDMpu BtqToITA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nWqSG-00Ccco-Or; Wed, 23 Mar 2022 02:10:32 +0000 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nWqSD-00CcbO-FE for linux-nvme@lists.infradead.org; Wed, 23 Mar 2022 02:10:30 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1648001427; 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=+VhNzK/4rqz9BBZ+NUufmtY5hd4LqSi4mcImA5YtOoE=; b=SIs4b2gJhk7NzfItrC80ETjFGzNzUmzgIbCeNO3T41YuE+Q/YnG+ZnUZFRsv+QgPobdC2i WBH3TR5Jmz0JqtsdN2W9dyvFtvDl7q9CjF9sUHpRoPhwLnyr/sa7yd9cPlGWYQMVPJC7D/ us8VKD1ArluzppHWGfkP9qYbKl6rA9o= Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-589-W-2kOXqDMXG8RgqKftdt1g-1; Tue, 22 Mar 2022 22:10:22 -0400 X-MC-Unique: W-2kOXqDMXG8RgqKftdt1g-1 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.rdu2.redhat.com [10.11.54.8]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 4C58C1C05ABA; Wed, 23 Mar 2022 02:10:21 +0000 (UTC) Received: from T590 (ovpn-8-19.pek2.redhat.com [10.72.8.19]) by smtp.corp.redhat.com (Postfix) with ESMTPS id E729DC202C5; Wed, 23 Mar 2022 02:10:11 +0000 (UTC) Date: Wed, 23 Mar 2022 10:10:06 +0800 From: Ming Lei To: Jens Axboe Cc: Kanchan Joshi , Kanchan Joshi , Christoph Hellwig , Keith Busch , Pavel Begunkov , io-uring@vger.kernel.org, linux-nvme@lists.infradead.org, linux-block@vger.kernel.org, sbates@raithlin.com, logang@deltatee.com, Pankaj Raghav , Javier =?iso-8859-1?Q?Gonz=E1lez?= , Luis Chamberlain , Adam Manzanares , Anuj Gupta Subject: Re: [PATCH 10/17] block: wire-up support for plugging Message-ID: References: <20220308152105.309618-1-joshi.k@samsung.com> <20220308152105.309618-11-joshi.k@samsung.com> <20220310083400.GD26614@lst.de> <20220321070208.GA5107@test-zns> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Scanned-By: MIMEDefang 2.85 on 10.11.54.8 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220322_191029_593062_D8C6FF7C X-CRM114-Status: GOOD ( 26.38 ) X-BeenThere: linux-nvme@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Linux-nvme" Errors-To: linux-nvme-bounces+linux-nvme=archiver.kernel.org@lists.infradead.org On Tue, Mar 22, 2022 at 07:58:25PM -0600, Jens Axboe wrote: > On 3/22/22 7:41 PM, Jens Axboe wrote: > > On 3/22/22 7:27 PM, Ming Lei wrote: > >> On Mon, Mar 21, 2022 at 12:32:08PM +0530, Kanchan Joshi wrote: > >>> On Mon, Mar 14, 2022 at 10:40:53PM +0800, Ming Lei wrote: > >>>> On Thu, Mar 10, 2022 at 06:10:08PM +0530, Kanchan Joshi wrote: > >>>>> On Thu, Mar 10, 2022 at 2:04 PM Christoph Hellwig wrote: > >>>>>> > >>>>>> On Tue, Mar 08, 2022 at 08:50:58PM +0530, Kanchan Joshi wrote: > >>>>>>> From: Jens Axboe > >>>>>>> > >>>>>>> Add support to use plugging if it is enabled, else use default path. > >>>>>> > >>>>>> The subject and this comment don't really explain what is done, and > >>>>>> also don't mention at all why it is done. > >>>>> > >>>>> Missed out, will fix up. But plugging gave a very good hike to IOPS. > >>>> > >>>> But how does plugging improve IOPS here for passthrough request? Not > >>>> see plug->nr_ios is wired to data.nr_tags in blk_mq_alloc_request(), > >>>> which is called by nvme_submit_user_cmd(). > >>> > >>> Yes, one tag at a time for each request, but none of the request gets > >>> dispatched and instead added to the plug. And when io_uring ends the > >>> plug, the whole batch gets dispatched via ->queue_rqs (otherwise it used > >>> to be via ->queue_rq, one request at a time). > >>> > >>> Only .plug impact looks like this on passthru-randread: > >>> > >>> KIOPS(depth_batch) 1_1 8_2 64_16 128_32 > >>> Without plug 159 496 784 785 > >>> With plug 159 525 991 1044 > >>> > >>> Hope it does clarify. > >> > >> OK, thanks for your confirmation, then the improvement should be from > >> batch submission only. > >> > >> If cached request is enabled, I guess the number could be better. > > > > Yes, my original test patch pre-dates being able to set a submit count, > > it would definitely help improve this case too. The current win is > > indeed just from being able to use ->queue_rqs() rather than single > > submit. > > Actually that is already there through io_uring, nothing extra is > needed. I meant in this patchset that plug->nr_ios isn't wired to data.nr_tags in blk_mq_alloc_request(), which is called by pt request allocation, so looks cached request isn't enabled for pt commands? Thanks, Ming