Received: by 2002:ab2:2994:0:b0:1ef:ca3e:3cd5 with SMTP id n20csp401898lqb; Thu, 14 Mar 2024 14:51:18 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXnmY9Od03c8zEGsQub5yld7alvWJTlHrA7u3M2LehOUlcZ/c5/UzzQXR5ooF++kcJG8fRHr8PGxBNOrh4HxnuZFzUxY70m+P+WKZTDew== X-Google-Smtp-Source: AGHT+IHu2Vy2Ro7yPO5reg2kPWcpqQPhGxU8Y4xEeaY80fcJRGJpvE55O1zqin8NnPx/JYkBen/s X-Received: by 2002:a05:620a:c08:b0:788:13eb:b243 with SMTP id l8-20020a05620a0c0800b0078813ebb243mr2806906qki.13.1710453078368; Thu, 14 Mar 2024 14:51:18 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1710453078; cv=pass; d=google.com; s=arc-20160816; b=g+HFsacA7Sc0Q6d3TPTNEJvZzI9o7oNO6XfgQaBA9vhTq+AeIuDH7I0fbxKL6GPon2 4H9i7DyiZY5y/D7RSiK/0p1F0kB5zqOVvQ9gj8dJVyaPkVQKqBV5cH42+yPdguS0flmC YZCuJSXTYJviUReCGNUJqyPKOwTp1JETGYVUyIjpjJOzs/3LMjZZvQ2wkhFiIE/o0/JO dHxrQH2QqHaLGiL/QBrhp2ZIOAMdrj9BlwiGHffoRn2z5K+xheR/loMico7JcRC2vKUf CQ/Bs+wYeQ7EBW14BOhjJZDzLqBg/urKJP+eOjCOUVBi8XFeGBjHBLRDuaSo+5ZbyBLj 8vbg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:user-agent :references:in-reply-to:subject:cc:to:from:dkim-signature; bh=UZknqzvQ4FXnNpri558VcyxPoGTUJkGKM/XaMZJUDBU=; fh=Vl2iccnszh96QosJXvNjg7zOwiqalD95MlliAb1Ee4E=; b=0nGLxPQV2v7diPXgmxYxpVfwYpSQbMkfMu28NDl/LdpkLc8eU1NKn2YZD6qLKtZIlO owjflNXB6wVVSGHYmS9ccbeP2RoafNryNGUdZS8NJ16BZoF2wueZD0shRu8RoN4CcO3a 9k4ruFuhGe+ufFz8ZEy5WVnOEudghgZPnDiIulLo3CEiWZM1Jcty9xo6C4K5NyGR/jYz P21CD82rsdYorOhX0n6oRWMqH7sjqTLBjQNdpzbYbd1brYXV6IuKS3frfLeVvzXkh0Zx iHTyrNwYQ/SGy9i2OVPTMcR7wwBhn8XegwnZNiFIT5WBET3EQ+2X35Oags3ZPApXzB4F 5u1Q==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@metaspace-dk.20230601.gappssmtp.com header.s=20230601 header.b=zJaYdoR6; arc=pass (i=1 dkim=pass dkdomain=metaspace-dk.20230601.gappssmtp.com); spf=pass (google.com: domain of linux-kernel+bounces-103726-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-103726-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id o5-20020a05620a228500b00789e4391a1bsi95555qkh.63.2024.03.14.14.51.18 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 14 Mar 2024 14:51:18 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-103726-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@metaspace-dk.20230601.gappssmtp.com header.s=20230601 header.b=zJaYdoR6; arc=pass (i=1 dkim=pass dkdomain=metaspace-dk.20230601.gappssmtp.com); spf=pass (google.com: domain of linux-kernel+bounces-103726-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-103726-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 09DCD1C21E05 for ; Thu, 14 Mar 2024 19:23:49 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id EF3E9762D9; Thu, 14 Mar 2024 19:23:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=metaspace-dk.20230601.gappssmtp.com header.i=@metaspace-dk.20230601.gappssmtp.com header.b="zJaYdoR6" Received: from mail-ed1-f44.google.com (mail-ed1-f44.google.com [209.85.208.44]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 19DE8762D3 for ; Thu, 14 Mar 2024 19:23:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.44 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710444187; cv=none; b=av8iAQ4HjRkmhx0bkS3OVO9yNWYVUoSf7iTKiENRbpU87afZBzpEMmJ/lpF29aWPDHNZwmBCjt5MyHGljxSt3yK1no9u/P98nuYSVo6EbURNQWdnFnvEzKj0HzTvYl2+WfPjx1S9RYYoOVHTnDyq/CCCes4eSm0JcrxgWrMZfPc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710444187; c=relaxed/simple; bh=UZknqzvQ4FXnNpri558VcyxPoGTUJkGKM/XaMZJUDBU=; h=From:To:Cc:Subject:In-Reply-To:References:Date:Message-ID: MIME-Version:Content-Type; b=mRG98Y7Ln37d4w6PJA5HTu9lHsfY/6rMAnvIARsbQ9LkpPTiNze1oXpDedeU6POaTOIJedZ7Bd84qmHeeCulTg8G67mZ2jV28QVIiP3UBrl7GXco7zhnez5HMj6KpzrlCdKWGxNqdO5HXd9u1X5f+0Ht3qpgx0fwi0byuQF2/00= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=metaspace.dk; spf=none smtp.mailfrom=metaspace.dk; dkim=pass (2048-bit key) header.d=metaspace-dk.20230601.gappssmtp.com header.i=@metaspace-dk.20230601.gappssmtp.com header.b=zJaYdoR6; arc=none smtp.client-ip=209.85.208.44 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=metaspace.dk Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=metaspace.dk Received: by mail-ed1-f44.google.com with SMTP id 4fb4d7f45d1cf-5684073ab38so2470356a12.0 for ; Thu, 14 Mar 2024 12:23:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=metaspace-dk.20230601.gappssmtp.com; s=20230601; t=1710444183; x=1711048983; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:user-agent :references:in-reply-to:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=UZknqzvQ4FXnNpri558VcyxPoGTUJkGKM/XaMZJUDBU=; b=zJaYdoR62LpQZ4gmNRiW90HBcvll6kmkTT0I8yiYizL+rgm1f1h4XvDJDWfVbvVfs9 esDRZVRZzuOaGHudRXs1mK796AoaHv9qfKxFDCMe/0m9vKPx9FCx4y+XffTxMMk1VYcy QvsFIIWRfGERdJhPGSujmoYhnU2g9Hpl1KRlD06yUzjYOUGkvvPrd23xHZCi9DT3fKie f1EaIgQ/HuXV4PgDSc9d7T2RHRYeIL5LAacRvrjgZT8XDlL6061WKUFehGSGtmB1tuUE bBuzON26u2FJx+fgX6U2aQDufjqwUaZDwxsYK64lyATFA0GgcMgIeRc8SrYRi1z8m5PA LfWA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1710444183; x=1711048983; h=content-transfer-encoding:mime-version:message-id:date:user-agent :references:in-reply-to:subject:cc:to:from:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=UZknqzvQ4FXnNpri558VcyxPoGTUJkGKM/XaMZJUDBU=; b=unDdtaTqKt56BgRQltm+oxDhaSe9gucqArY8u76kOy+4zBYQAJY87jhCFiew7TSjs2 tAn/C6O5Nrmkm6n4pwEdbUpA04o2nRuXcpRpgaycJc5+DCmFZ7kQ/Y6s4ABD1/bUF62h xmMRVRQ4Lk3YnNV0mxGL0gY22k/rWUDoL2CYYd2I95stvEwWNqCe3oGrSl7itsaqdAki VKZ6zaJxwXlrLA51Bf1arntITnc5vD9wSQ/pNF6GKLuSEt3v2acvA+MWdLKfWTN9g9Cj mNpGVQN16+8QMqYiOOHT+6cEbtH89nsYOyliEKUrEBWf7CfRMMfw2fMqkWz8mzA2wveq zisg== X-Forwarded-Encrypted: i=1; AJvYcCWY2bvUSUp9CMxAh+5qchNarDGb/hjA3cdaQMiQRXEAQh4cnd9x7FKthzkO7ANOQwxJ9HXJmAwZBGeCIpsjzCGh/Iyxp0GgAP9nwmc1 X-Gm-Message-State: AOJu0YwNDmTjN5TnIxs9ba4w5bMHLhfnd7obGj7AkVhSvoKypll1wOEw 93xFvFFVwmG9Es9gJCzuWifDiJk4vtvF5X5sKgmVO81HNWn3ipTMFATnHJ9GtSg= X-Received: by 2002:a05:6402:4493:b0:567:80c7:33bf with SMTP id er19-20020a056402449300b0056780c733bfmr3038848edb.7.1710444183353; Thu, 14 Mar 2024 12:23:03 -0700 (PDT) Received: from localhost ([79.142.230.34]) by smtp.gmail.com with ESMTPSA id et4-20020a056402378400b00568a15b063csm799503edb.2.2024.03.14.12.23.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 14 Mar 2024 12:23:02 -0700 (PDT) From: Andreas Hindborg To: Miguel Ojeda Cc: Boqun Feng , Jens Axboe , Christoph Hellwig , Keith Busch , Damien Le Moal , Bart Van Assche , Hannes Reinecke , "linux-block@vger.kernel.org" , Andreas Hindborg , Wedson Almeida Filho , Niklas Cassel , Greg KH , Matthew Wilcox , Miguel Ojeda , Alex Gaynor , Gary Guo , =?utf-8?Q?Bj=C3=B6rn?= Roy Baron , Benno Lossin , Alice Ryhl , Chaitanya Kulkarni , Luis Chamberlain , Yexuan Yang <1182282462@bupt.edu.cn>, Sergio =?utf-8?Q?Gonz=C3=A1lez?= Collado , Joel Granados , "Pankaj Raghav (Samsung)" , Daniel Gomez , open list , "rust-for-linux@vger.kernel.org" , "lsf-pc@lists.linux-foundation.org" , "gost.dev@samsung.com" Subject: Re: [RFC PATCH 1/5] rust: block: introduce `kernel::block::mq` module In-Reply-To: (Miguel Ojeda's message of "Thu, 14 Mar 2024 19:55:49 +0100") References: <20240313110515.70088-1-nmi@metaspace.dk> <20240313110515.70088-2-nmi@metaspace.dk> <87il1ptck0.fsf@metaspace.dk> User-Agent: mu4e 1.12.0; emacs 29.2 Date: Thu, 14 Mar 2024 20:22:54 +0100 Message-ID: <87plvwsjn5.fsf@metaspace.dk> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Miguel Ojeda writes: > On Thu, Mar 14, 2024 at 9:58=E2=80=AFAM Andreas Hindborg wrote: >> >> Yes, good point. Another option suggested by Miguel is that >> `__blk_mq_free_request` need not be exported at all. We can make it >> non-static and then call it from >> `rust_helper_blk_mq_free_request_internal()`. Then only the latter will >> be in the kernel image symbol table, which might be better in terms of >> not exposing `__blk_mq_free_request()` directly. > > The helper is not needed, i.e. what I meant was to make it non-static > and add it to `include/linux/blk-mq.h`. The way the current code compiles, ::dec_ref` is inlined into the `rnull` module. A relocation for `rust_helper_blk_mq_free_request_internal` appears in `rnull_mod.ko`. I didn't test it yet, but if `__blk_mq_free_request` (or the helper) is not exported, I don't think this would be possible? BR Andreas