From: "David Hildenbrand (Red Hat)" <david@kernel.org>
To: Gregory Price <gourry@gourry.net>,
Jonathan Cameron <jonathan.cameron@huawei.com>
Cc: linux-mm@kvack.org, linux-cxl@vger.kernel.org,
nvdimm@lists.linux.dev, linux-kernel@vger.kernel.org,
virtualization@lists.linux.dev, kernel-team@meta.com,
dan.j.williams@intel.com, vishal.l.verma@intel.com,
dave.jiang@intel.com, mst@redhat.com, jasowang@redhat.com,
xuanzhuo@linux.alibaba.com, eperezma@redhat.com,
osalvador@suse.de, akpm@linux-foundation.org
Subject: Re: [PATCH 3/8] mm/memory_hotplug: add APIs for explicit online type control
Date: Wed, 28 Jan 2026 00:06:01 +0100 [thread overview]
Message-ID: <793fb531-1fda-4de4-b73f-fb46444ca613@kernel.org> (raw)
In-Reply-To: <aXPIGMVAvVEBgFhJ@gourry-fedora-PF4VCD3F>
On 1/23/26 20:12, Gregory Price wrote:
> On Fri, Jan 23, 2026 at 06:25:26PM +0000, Jonathan Cameron wrote:
>> On Thu, 22 Jan 2026 19:34:10 -0500
>> Gregory Price <gourry@gourry.net> wrote:
>>
>>>
>>> Ah, this was lost on me.
>>>
>>>
>>> unclear to me how to restrict a function to specific drivers, but i can
>>> add add_and_online_memory_driver_managed() trivially so no big issue.
>>
>> Is EXPORT_SYMBOL_GPL_FOR_MODULE() enough?
It's also fine for me to just limit add_memory_driver_managed() to
in-tree driver by using EXPORT_SYMBOL_FOR_MODULES.
But it might make nvidia unhappy :)
So maybe just adding a __add_memory_driver_managed() that gives us more
control and using EXPORT_SYMBOL_FOR_MODULES is being a bit nicer for OOT
modules.
(I guess __add_memory_driver_managed is a better name than
add_and_online_memory_driver_managed, thinking about it)
>>
>
> Is the issue just that add_memory_driver_manage is `extern`?
Heh, the "extern" is simply not necessary and can be dropped from all
such functions. Not related to this. It's all about EXPORT_SYMBOL_GPL
allowing anything that claims to be a GPL module to use this functionality.
> If so
> yeah, i can just do the EXPORT_*_GPL path.
>
> If you prefer FOR_MODULE, then yes I can do this.
I'd go for
EXPORT_SYMBOL_FOR_MODULES(__add_memory_driver_managed, "dax")
(or would it be the kmem module?)
--
Cheers
David
next prev parent reply other threads:[~2026-01-27 23:06 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-14 8:51 Subject: [PATCH 0/8] dax/kmem: add runtime hotplug state control Gregory Price
2026-01-14 8:51 ` [PATCH 1/8] mm/memory_hotplug: pass online_type to online_memory_block() via arg Gregory Price
2026-01-14 9:46 ` David Hildenbrand (Red Hat)
2026-01-14 8:51 ` [PATCH 2/8] mm/memory_hotplug: extract __add_memory_resource() and __offline_memory() Gregory Price
2026-01-14 10:14 ` David Hildenbrand (Red Hat)
2026-01-14 17:11 ` Gregory Price
2026-01-14 8:51 ` [PATCH 3/8] mm/memory_hotplug: add APIs for explicit online type control Gregory Price
2026-01-14 10:21 ` David Hildenbrand (Red Hat)
2026-01-14 17:27 ` Gregory Price
2026-01-22 22:41 ` David Hildenbrand (Red Hat)
2026-01-23 0:34 ` Gregory Price
2026-01-23 18:25 ` Jonathan Cameron
2026-01-23 19:12 ` Gregory Price
2026-01-27 23:06 ` David Hildenbrand (Red Hat) [this message]
2026-01-27 23:31 ` Gregory Price
2026-01-14 8:51 ` [PATCH 4/8] mm/memory_hotplug: return online type from add_memory_driver_managed() Gregory Price
2026-01-14 10:49 ` David Hildenbrand (Red Hat)
2026-01-14 17:28 ` Gregory Price
2026-01-14 8:51 ` [PATCH 5/8] dax/kmem: extract hotplug/hotremove helper functions Gregory Price
2026-01-14 8:51 ` [PATCH 6/8] dax/kmem: add online/offline " Gregory Price
2026-01-14 8:51 ` [PATCH 7/8] dax/kmem: add sysfs interface for runtime hotplug state control Gregory Price
2026-01-14 10:55 ` David Hildenbrand (Red Hat)
2026-01-14 17:32 ` Gregory Price
2026-01-14 18:11 ` Gregory Price
2026-01-22 22:49 ` David Hildenbrand (Red Hat)
2026-01-23 0:43 ` Gregory Price
2026-01-27 23:06 ` David Hildenbrand (Red Hat)
2026-01-14 8:52 ` [PATCH 8/8] dax/kmem: add memory notifier to block external state changes Gregory Price
2026-01-14 9:44 ` David Hildenbrand (Red Hat)
2026-01-14 17:07 ` Gregory Price
2026-01-22 22:44 ` David Hildenbrand (Red Hat)
2026-01-14 17:36 ` Gregory Price
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=793fb531-1fda-4de4-b73f-fb46444ca613@kernel.org \
--to=david@kernel.org \
--cc=akpm@linux-foundation.org \
--cc=dan.j.williams@intel.com \
--cc=dave.jiang@intel.com \
--cc=eperezma@redhat.com \
--cc=gourry@gourry.net \
--cc=jasowang@redhat.com \
--cc=jonathan.cameron@huawei.com \
--cc=kernel-team@meta.com \
--cc=linux-cxl@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mst@redhat.com \
--cc=nvdimm@lists.linux.dev \
--cc=osalvador@suse.de \
--cc=virtualization@lists.linux.dev \
--cc=vishal.l.verma@intel.com \
--cc=xuanzhuo@linux.alibaba.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox