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 63F46C433F5 for ; Wed, 16 Mar 2022 05:17:45 +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:References:Content-Type: In-Reply-To:MIME-Version: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=sUMhv7V5Mr8UF8aDj5esC34wRqZ5z8WHnhn52HyKeIk=; b=KiK+fR1+KG3p9O/GFzOsh39Vqm ds2+FEfCWqNIF10J3Vf3TyAg0IIHgeEs/6s/7K7iC0BtFQ0zUbow2i7FIrllzxjDBNNu3Za5RPTBy 4WXsSzvGkCeY6cBsQdavGYD6BRow4OLPsxPa0Wd+xp6OG5SLiOxwh7i/0osLQ+P/vlCyoux+DhNej NJJzMytpoRbPVAk4V++ygJCPLTO3Bz6ak2O+sVxnF5/NrukBNTly35EwYAGOxR7j7QAM2XnUqdOj3 +YoThdw6mdlWUbzE46hBYCT77ml0nhJuJKnSSsmOn/ruGEj1VPuW21ox05D0fVSi+MljMOr0Aq7DR eTu+hm0Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nUM2V-00BTAI-PH; Wed, 16 Mar 2022 05:17:39 +0000 Received: from mailout4.samsung.com ([203.254.224.34]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nUM2S-00BT8A-9C for linux-nvme@lists.infradead.org; Wed, 16 Mar 2022 05:17:38 +0000 Received: from epcas5p3.samsung.com (unknown [182.195.41.41]) by mailout4.samsung.com (KnoxPortal) with ESMTP id 20220316051732epoutp049bca1ae7947ecf424ba813629a34e85f~cxLagWb8B1245212452epoutp04g for ; Wed, 16 Mar 2022 05:17:32 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout4.samsung.com 20220316051732epoutp049bca1ae7947ecf424ba813629a34e85f~cxLagWb8B1245212452epoutp04g DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1647407852; bh=sUMhv7V5Mr8UF8aDj5esC34wRqZ5z8WHnhn52HyKeIk=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=W4hC9/JmPUbCG7Zf6zL6iV+7R4/eOg7Dp8+s9SA7prgkl0EggWms7PLGNDlWrN9yD FzAX95MR3t2sc3V4BKt91IjcHDTpDukI3BfiU0gxH+dYH/07VIvKzl6dt7l33I0+4I YQWsxr5f8dgc4JlifarPpuhLFjjwi+FmlCzjwlzY= Received: from epsnrtp2.localdomain (unknown [182.195.42.163]) by epcas5p1.samsung.com (KnoxPortal) with ESMTP id 20220316051731epcas5p1f3f5cf0288f95c6ca9b8fe2dc008602f~cxLZ0wbh63041230412epcas5p1b; Wed, 16 Mar 2022 05:17:31 +0000 (GMT) Received: from epsmges5p1new.samsung.com (unknown [182.195.38.180]) by epsnrtp2.localdomain (Postfix) with ESMTP id 4KJJS46Lrfz4x9QN; Wed, 16 Mar 2022 05:17:24 +0000 (GMT) Received: from epcas5p1.samsung.com ( [182.195.41.39]) by epsmges5p1new.samsung.com (Symantec Messaging Gateway) with SMTP id 09.1D.06423.4E271326; Wed, 16 Mar 2022 14:17:24 +0900 (KST) Received: from epsmtrp1.samsung.com (unknown [182.195.40.13]) by epcas5p1.samsung.com (KnoxPortal) with ESMTPA id 20220316051408epcas5p199c4114bb75bad00f98c10c343f3b989~cxIcMqogw2601026010epcas5p1k; Wed, 16 Mar 2022 05:14:08 +0000 (GMT) Received: from epsmgms1p2.samsung.com (unknown [182.195.42.42]) by epsmtrp1.samsung.com (KnoxPortal) with ESMTP id 20220316051407epsmtrp1d9073a1b7a6909c25c504b7bd42aa253~cxIcLObpg2039020390epsmtrp1E; Wed, 16 Mar 2022 05:14:07 +0000 (GMT) X-AuditID: b6c32a49-b01ff70000001917-eb-623172e450bc Received: from epsmtip1.samsung.com ( [182.195.34.30]) by epsmgms1p2.samsung.com (Symantec Messaging Gateway) with SMTP id CE.01.03370.F1271326; Wed, 16 Mar 2022 14:14:07 +0900 (KST) Received: from test-zns (unknown [107.110.206.5]) by epsmtip1.samsung.com (KnoxPortal) with ESMTPA id 20220316051405epsmtip16bb3c47da5c042494a3836f0677dfa7e~cxIaEOI611821718217epsmtip1l; Wed, 16 Mar 2022 05:14:05 +0000 (GMT) Date: Wed, 16 Mar 2022 10:39:05 +0530 From: Kanchan Joshi To: Christoph Hellwig Cc: 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 =?utf-8?B?R29uesOhbGV6?= , Luis Chamberlain , Adam Manzanares , Anuj Gupta Subject: Re: [PATCH 14/17] io_uring: add polling support for uring-cmd Message-ID: <20220316050905.GA28016@test-zns> MIME-Version: 1.0 In-Reply-To: <20220315085745.GE4132@lst.de> User-Agent: Mutt/1.9.4 (2018-02-28) X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFrrBJsWRmVeSWpSXmKPExsWy7bCmuu6TIsMkg9ZZRhbTDytaNE34y2wx Z9U2RovVd/vZLFauPspk8a71HItF5+kLTBbn3x5msph06Bqjxd5b2hbzlz1lt1jSepzN4saE p4wWa24+ZbH4fGYeqwO/x7Orzxg9ds66y+7RvOAOi8fls6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bXftx1TK6yY9sZpbXMxq/D3vsfWsbLrs+fnyL9TosXu /NNl+mlQcbH3qFP7FSWW4oxEQy3mouJEAO23rvkrAwAA X-CMS-MailID: 20220316051408epcas5p199c4114bb75bad00f98c10c343f3b989 X-Msg-Generator: CA Content-Type: multipart/mixed; boundary="----.rW42XXn7_Ji6OxwuAF4RAMbP.qed.OeqKlvEhSLhB3noATS=_119d09_" X-Sendblock-Type: REQ_APPROVE CMS-TYPE: 105P DLP-Filter: Pass X-CFilter-Loop: Reflected X-CMS-RootMailID: 20220308152723epcas5p34460b4af720e515317f88dbb78295f06 References: <20220308152105.309618-1-joshi.k@samsung.com> <20220308152105.309618-15-joshi.k@samsung.com> <20220311065007.GC17728@lst.de> <20220315085745.GE4132@lst.de> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220315_221736_772729_C0A7BA43 X-CRM114-Status: GOOD ( 14.84 ) 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 ------.rW42XXn7_Ji6OxwuAF4RAMbP.qed.OeqKlvEhSLhB3noATS=_119d09_ Content-Type: text/plain; charset="utf-8"; format="flowed" Content-Disposition: inline On Tue, Mar 15, 2022 at 09:57:45AM +0100, Christoph Hellwig wrote: >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. So how about adding ->async_cmd_poll in file_operations (since this corresponds to ->async_cmd)? It will take struct io_uring_cmd pointer as parameter. Both ->iopoll and ->async_cmd_poll will differ in what they accept (kiocb vs io_uring_cmd). The provider may use bio_poll, or whatever else is the implementation detail. for read/write, submission interface took kiocb, and completion interface (->iopoll) also operated on the same. for uring/async-cmd, submission interface took io_uring_cmd, but completion used kiocb based ->iopoll. The new ->async_cmd_poll should settle this. ------.rW42XXn7_Ji6OxwuAF4RAMbP.qed.OeqKlvEhSLhB3noATS=_119d09_ Content-Type: text/plain; charset="utf-8" ------.rW42XXn7_Ji6OxwuAF4RAMbP.qed.OeqKlvEhSLhB3noATS=_119d09_--