Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp3734505pxb; Wed, 13 Oct 2021 11:50:26 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzt0Kq18QgHyb4mXGvSYfxBzs1T8bGMsuiU4ptJBIP5uI08zB6KHZO1/AZzyHrc4uXdSe6R X-Received: by 2002:a50:e005:: with SMTP id e5mr1523622edl.211.1634151026445; Wed, 13 Oct 2021 11:50:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1634151026; cv=none; d=google.com; s=arc-20160816; b=AMyZsDnmBnFkJdZH8zWjdxhBcMKwJW/evgfv2OYr7v2NJr1qUy9H+oaAXfdvjRLfDz 3mBkes7pkZ+GWH0aP5f6dkDbeR06An5IxqVe0lnAyi4YdXYfzZpfzZN1qdOCLIdqpw5K ussDZpl7A2GQLf/0i4muC8HaetSGFSCFKNnmUbY2S98styWgx6ywNIhFIpKp4YzCygbc Q+6cQwKapvShtO90MPQfgCDclMKG4g7sPZoD7ckr9WGJsvSi/f7n0TdOxKN9uIyVrdHt HZ3w/5YmOsFUw//jAtMNaUBt5KdZuMoOyGsXkQaBvzH0FJG/vQBsG43OM3t3mxYMrpOx P2lA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:subject :from:references:cc:to:content-language:user-agent:mime-version:date :message-id:dkim-signature; bh=j9rOFLr09wfwjFoaWXR0mmDKmaON+pqQWXtctji3kCE=; b=FFHPmCwG1AELO19qqy5L+XxIib3oKbMi2q/+MR36UihqAeGLcYFNGPTD9i8sRf/ETu RoZGQfJ+r1Uo0UM3yOwn5eV7kGvHaEMhOui3C5syAC+6+YcdHxGL8xzgb+21v+mq1bei v43Kl+HgXkznZN5XCVoyPoREeO9Gfb17zodQtNY8j/bIqlTZme+cf4YfSG+rR3UGKe8u YWdewGYCCSAVeHqHQSxy8bb8KNPEm6Phj3P7AciI/8nt2rWGNly5Dts0CeCGQTgnRd+S 5XyiVuoFNXoIwWSF5uwpdLTW+rQxizOY5L2dW35XVJHvr69XMYqmvU7NGti2iVj08r4P 7P0g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=nDOJLYtO; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id q15si494742edd.169.2021.10.13.11.50.02; Wed, 13 Oct 2021 11:50:26 -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=@gmail.com header.s=20210112 header.b=nDOJLYtO; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238652AbhJMSrM (ORCPT + 99 others); Wed, 13 Oct 2021 14:47:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53440 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229814AbhJMSrF (ORCPT ); Wed, 13 Oct 2021 14:47:05 -0400 Received: from mail-wr1-x42c.google.com (mail-wr1-x42c.google.com [IPv6:2a00:1450:4864:20::42c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F24FFC061570; Wed, 13 Oct 2021 11:45:01 -0700 (PDT) Received: by mail-wr1-x42c.google.com with SMTP id y3so11592058wrl.1; Wed, 13 Oct 2021 11:45:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=message-id:date:mime-version:user-agent:content-language:to:cc :references:from:subject:in-reply-to:content-transfer-encoding; bh=j9rOFLr09wfwjFoaWXR0mmDKmaON+pqQWXtctji3kCE=; b=nDOJLYtOwhBHUo/BBCDwExeaXTYlazn1TBXSb/rnKfcFVm1BvTIxYwdxM6+BH4ZahX UHFaGLVVLVYYx30+CLaluYsKUeV3tBiJ+kZvcU5hWAUq9n6EsupXIRPnHirgqa8xIJfX 5zrIN3kzisXvXpjXk/kKC5YrcVT+JDePHqIlPnJtX7isfLNMKsKsLp+QjZqfb900Hkjc wqHTVcIIucPeHpcAC86vT1wcAKysMK0BeSWtu2Xvnj81rkuqh9QMM+OL0EGj4glyyYrh nSacVCNcn5gupbXuK5s0zRKi68MeKLVAq5S4FLbnPhxCCmQwjQfWwTPneKsd+keEMORa dwZw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent :content-language:to:cc:references:from:subject:in-reply-to :content-transfer-encoding; bh=j9rOFLr09wfwjFoaWXR0mmDKmaON+pqQWXtctji3kCE=; b=HyJxJPvOYG70ABmyt1SjudUlLDlnGyQrkepv4gisJuex6pU/qHcS2PWLdTlYS8pV8k VpcLn3uV5SrKyj+s1UL6KrmysHuuTVfPZ54WzcmNQkK4FoLC61dYU4WvshZEF4B5axc/ wNNe27Cr5rDaK/OFGLFoHET1PQqp5IxUJR0cogRfZFAibx25azgX1ewyhh/DaIfMIOze 3fbX5Bxecm5vwkPdW4nailbpDQLoexeGUey5fYC6sllwSCd9eAjdiDcxhlTGnt5IkqD0 TuNrTFwa4uI0LkJZrT0n0teaqr3QHvqjkmfXj47rA50HD6DoTdloWab3TtohCLPq9o2w NI8Q== X-Gm-Message-State: AOAM533OuIdzhzu9KpCoBjb2K5jWg1iUcWljZ8Q60IxxKAPzECJW2bCV tNl0S/6J+BMHGCJKCUQFjTkujsJCK/0= X-Received: by 2002:adf:9c02:: with SMTP id f2mr928377wrc.329.1634150700627; Wed, 13 Oct 2021 11:45:00 -0700 (PDT) Received: from [192.168.8.197] ([185.69.145.214]) by smtp.gmail.com with ESMTPSA id l17sm343484wrx.24.2021.10.13.11.44.59 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 13 Oct 2021 11:45:00 -0700 (PDT) Message-ID: <194577df-0402-6e3c-3534-af289b5494e0@gmail.com> Date: Wed, 13 Oct 2021 19:44:20 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.1.2 Content-Language: en-US To: Christoph Hellwig Cc: Jens Axboe , linux-block@vger.kernel.org, linux-kernel@vger.kernel.org References: <2b8c84834a304871d78f91d4ebe153fac2192fd5.1634115360.git.asml.silence@gmail.com> From: Pavel Begunkov Subject: Re: [PATCH v2 2/3] block: don't hide inode from block_device users In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 10/13/21 16:25, Christoph Hellwig wrote: > On Wed, Oct 13, 2021 at 09:57:12AM +0100, Pavel Begunkov wrote: >> Instead of tricks with struct bdev_inode, just openly place the inode >> inside struct block_device. First, it allows us to inline I_BDEV, which >> is simple but non-inline nature of it impacts performance. Also, make it >> possible to get rid of ->bd_inode pointer and hooping with extra >> indirection, the amount of which became a noticeable problem for the >> block layer. > > What fast path outside of bdev.c cares about an inlined I_BDEV? 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? > I have dusted off patches to reduce (and hopefully eventually kill) > accesses to bd_inode outside of bdev.c, so this goes into the wrong > direction. > > If needed I'd rather figure out a way to fix any smoking gun without > this change. > -- Pavel Begunkov