Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp4129357pxb; Wed, 13 Oct 2021 21:57:25 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwxX+E59V9uh7qa0zLkYFTkqRC4rLmtIh5nS296RQAIPZTPAaoYUge0Kq8EE83zZ/WHhouD X-Received: by 2002:a63:5651:: with SMTP id g17mr2664894pgm.119.1634187444912; Wed, 13 Oct 2021 21:57:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1634187444; cv=none; d=google.com; s=arc-20160816; b=en4GHiBrn66Wa4EBehvvrq9eyqutuOJuIOkMTCEkJav9hL0CgE5YYfVUYLsCXsbG29 rvqMohIQkhHR1J9wUMBXy8Ba/+RBZiSoJgm12NxhHgYSf60GMFhnYv6aKI/uvaWnAu+2 0odNtLTfBfPXk1Z33hE86KfB+qOT0t6jegr2jDFBSiPlHb27dplsHErrgBm6+cr/ysDL bT37S7CJ4x1bBTQM8GP9XJ1l4wRz8q7In1FIQa4XZTezwdva8q0xwiMDl6abHHS1D1TS i8VpLGuQ6ONddV23g/gzlYiQTm5FLskjlA4/1zb15IgIb2x17sTEHIkRQ6xmQXkNA1qs vl1g== 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=t2BdXrWywNYOUH0CxxelxpJTB7lMZFSXr5ZhE4N9XIw=; b=jhyCmLLFk8EaU6Gm0Jr4RAYYH7bR27Dp6Q6y+e/7sSX5MuD92VbWOyeEBfDyThEe3U dylhlnPRhIIJpJcn5217six//Rp9f6FWHNC3kWgWBzbBTTXksYcJucVaikPwRzj48yR/ OGtPXG9RPNEpwc0sm31IftfjnrYX1S3RC0TrgcyNmKnGJ6yZp+LzUSlClsY4pqSgrgIm gyHPtIlqJLWS50QZycwBaZ8GaGkz5EwBrVZA6bC5sDXJIGlyTi8vdqIZY3aPnonvGReJ KCYZs6ELtqi7ofIR4nQEIoSNIP+Dgms/3gv0OAAODGPmVNh1TJJzpUqPV/gWLAOnN5wR oXNg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=IcTIFqr0; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id pf8si14708811pjb.84.2021.10.13.21.57.11; Wed, 13 Oct 2021 21:57:24 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=IcTIFqr0; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229519AbhJNE4f (ORCPT + 99 others); Thu, 14 Oct 2021 00:56:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49662 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229457AbhJNE4e (ORCPT ); Thu, 14 Oct 2021 00:56:34 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5094FC061570; Wed, 13 Oct 2021 21:54:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=t2BdXrWywNYOUH0CxxelxpJTB7lMZFSXr5ZhE4N9XIw=; b=IcTIFqr0V0C17XUv9yrfBZgJ0I 7csUj3uaNlxEezJr867OOoO/ueCzy8Rk3evV3LLB5Tynw36UUIWSbs0yBc5Ld55Vl/4wrdNLq416E 5L3I8amuZsT1qiXh3Zy6StZKigjiU8h0A1zGo+bVucsFAnEsAPI22QtkUqBEv2WPOTT9zeNXmhuFw 1pvCwFyWUi7aBR+IPIlQdBa3PJDuKoEIVl4em5a9Yhlg+U1Ih9ZzuJbnLjA4ycNWIaDMrBnQIrXXE L+O950fMzxeb43q+YyFBnTF5KrEY0iHb4TuDY54qtW4bafHtjWDMQqmp9CJfGhnxdY8l70vm5ow2T DNVWPIHg==; Received: from hch by casper.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1masi1-0082VA-Lr; Thu, 14 Oct 2021 04:51:53 +0000 Date: Thu, 14 Oct 2021 05:51:13 +0100 From: Christoph Hellwig To: Pavel Begunkov Cc: Christoph Hellwig , Jens Axboe , linux-block@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2 2/3] block: don't hide inode from block_device users Message-ID: References: <2b8c84834a304871d78f91d4ebe153fac2192fd5.1634115360.git.asml.silence@gmail.com> <194577df-0402-6e3c-3534-af289b5494e0@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <194577df-0402-6e3c-3534-af289b5494e0@gmail.com> X-SRS-Rewrite: SMTP reverse-path rewritten from by casper.infradead.org. See http://www.infradead.org/rpr.html Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Oct 13, 2021 at 07:44:20PM +0100, Pavel Begunkov wrote: > Mildly hot in io_uring w/o fixed files, but that's not peak perf, > but would also be great to get rid of bdev->bd_inode dereference, > e.g. lots of in fops.c. > > Are you going to just hid the dereference in helpers or kill it > with some offseting magic? The only real hot path uses I found is the size (which you and Jens already seem to have moved to use something out of the inode for the fast path), and maybe the blkbits for which we could do the same. So basically the idea is to not touch the inode in the hot path, and use accessors helpers in bdev.c that could do the offsetof trick.