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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 11511C433F5 for ; Tue, 15 Mar 2022 08:57:51 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345206AbiCOI7A (ORCPT ); Tue, 15 Mar 2022 04:59:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54520 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1346290AbiCOI7A (ORCPT ); Tue, 15 Mar 2022 04:59:00 -0400 Received: from verein.lst.de (verein.lst.de [213.95.11.211]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BB5D522D; Tue, 15 Mar 2022 01:57:48 -0700 (PDT) Received: by verein.lst.de (Postfix, from userid 2407) id 11FEF68AA6; Tue, 15 Mar 2022 09:57:46 +0100 (CET) Date: Tue, 15 Mar 2022 09:57:45 +0100 From: Christoph Hellwig To: Kanchan Joshi Cc: Christoph Hellwig , Kanchan Joshi , Jens Axboe , 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 14/17] io_uring: add polling support for uring-cmd Message-ID: <20220315085745.GE4132@lst.de> References: <20220308152105.309618-1-joshi.k@samsung.com> <20220308152105.309618-15-joshi.k@samsung.com> <20220311065007.GC17728@lst.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.17 (2007-11-01) Precedence: bulk List-ID: X-Mailing-List: io-uring@vger.kernel.org On Mon, Mar 14, 2022 at 03:46:08PM +0530, Kanchan Joshi wrote: > But, after you did bio based polling, we need just the bio to poll. > iocb is a big structure (48 bytes), and if we try to place it in > struct io_uring_cmd, we will just blow up the cacheline in io_uring > (first one in io_kiocb). > So we just store that bio pointer in io_uring_cmd on submission > (please see patch 15). > And here on completion we pick that bio, and put that into this local > iocb, simply because ->iopoll needs it. > Do you see I am still missing anything here? Yes. The VFS layer interface for polling is the kiocb. Don't break it. The bio is just an implementation detail.