From: "Huang, Ying" <ying.huang@intel.com>
To: Vishal Verma <vishal.l.verma@intel.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
David Hildenbrand <david@redhat.com>,
Oscar Salvador <osalvador@suse.de>,
Dan Williams <dan.j.williams@intel.com>,
Dave Jiang <dave.jiang@intel.com>,
<linux-kernel@vger.kernel.org>, <linux-mm@kvack.org>,
<nvdimm@lists.linux.dev>, <linux-cxl@vger.kernel.org>,
Dave Hansen <dave.hansen@linux.intel.com>,
"Aneesh Kumar K.V" <aneesh.kumar@linux.ibm.com>,
Jonathan Cameron <Jonathan.Cameron@Huawei.com>,
Jeff Moyer <jmoyer@redhat.com>
Subject: Re: [PATCH v2 1/3] mm/memory_hotplug: Export symbol mhp_supports_memmap_on_memory()
Date: Mon, 24 Jul 2023 14:00:34 +0800 [thread overview]
Message-ID: <87sf9d26il.fsf@yhuang6-desk2.ccr.corp.intel.com> (raw)
In-Reply-To: <20230720-vv-kmem_memmap-v2-1-88bdaab34993@intel.com> (Vishal Verma's message of "Thu, 20 Jul 2023 01:14:22 -0600")
Vishal Verma <vishal.l.verma@intel.com> writes:
> In preparation for dax drivers, which can be built as modules,
> to use this interface, export it with EXPORT_SYMBOL_GPL(). Add a #else
> case for the symbol for builds without CONFIG_MEMORY_HOTPLUG.
>
> Cc: Andrew Morton <akpm@linux-foundation.org>
> Cc: David Hildenbrand <david@redhat.com>
> Cc: Oscar Salvador <osalvador@suse.de>
> Cc: Dan Williams <dan.j.williams@intel.com>
> Cc: Dave Jiang <dave.jiang@intel.com>
> Cc: Dave Hansen <dave.hansen@linux.intel.com>
> Cc: Huang Ying <ying.huang@intel.com>
> Reviewed-by: David Hildenbrand <david@redhat.com>
> Signed-off-by: Vishal Verma <vishal.l.verma@intel.com>
> ---
> include/linux/memory_hotplug.h | 5 +++++
> mm/memory_hotplug.c | 1 +
> 2 files changed, 6 insertions(+)
>
> diff --git a/include/linux/memory_hotplug.h b/include/linux/memory_hotplug.h
> index 013c69753c91..fc5da07ad011 100644
> --- a/include/linux/memory_hotplug.h
> +++ b/include/linux/memory_hotplug.h
> @@ -355,6 +355,11 @@ extern int arch_create_linear_mapping(int nid, u64 start, u64 size,
> struct mhp_params *params);
> void arch_remove_linear_mapping(u64 start, u64 size);
> extern bool mhp_supports_memmap_on_memory(unsigned long size);
> +#else
> +static inline bool mhp_supports_memmap_on_memory(unsigned long size)
> +{
> + return false;
> +}
> #endif /* CONFIG_MEMORY_HOTPLUG */
It appears that there is no user of mhp_supports_memmap_on_memory() that
may be compiled with !CONFIG_MEMORY_HOTPLUG?
--
Best Regards,
Huang, Ying
> #endif /* __LINUX_MEMORY_HOTPLUG_H */
> diff --git a/mm/memory_hotplug.c b/mm/memory_hotplug.c
> index 3f231cf1b410..e9bcacbcbae2 100644
> --- a/mm/memory_hotplug.c
> +++ b/mm/memory_hotplug.c
> @@ -1284,6 +1284,7 @@ bool mhp_supports_memmap_on_memory(unsigned long size)
> IS_ALIGNED(vmemmap_size, PMD_SIZE) &&
> IS_ALIGNED(remaining_size, (pageblock_nr_pages << PAGE_SHIFT));
> }
> +EXPORT_SYMBOL_GPL(mhp_supports_memmap_on_memory);
>
> /*
> * NOTE: The caller must call lock_device_hotplug() to serialize hotplug
next prev parent reply other threads:[~2023-07-24 6:02 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-20 7:14 [PATCH v2 0/3] mm: use memmap_on_memory semantics for dax/kmem Vishal Verma
2023-07-20 7:14 ` [PATCH v2 1/3] mm/memory_hotplug: Export symbol mhp_supports_memmap_on_memory() Vishal Verma
2023-07-24 6:00 ` Huang, Ying [this message]
2023-07-20 7:14 ` [PATCH v2 2/3] mm/memory_hotplug: split memmap_on_memory requests across memblocks Vishal Verma
2023-07-21 12:20 ` Aneesh Kumar K.V
2023-07-23 14:53 ` Aneesh Kumar K.V
2023-07-24 3:16 ` Huang, Ying
2023-08-02 6:02 ` Verma, Vishal L
2023-08-14 6:04 ` Huang, Ying
2023-07-24 5:54 ` Huang, Ying
2023-08-02 6:08 ` Verma, Vishal L
2023-08-14 6:45 ` Huang, Ying
2023-08-14 7:20 ` David Hildenbrand
2023-07-20 7:14 ` [PATCH v2 3/3] dax/kmem: allow kmem to add memory with memmap_on_memory Vishal Verma
2023-07-25 15:54 ` [PATCH v2 0/3] mm: use memmap_on_memory semantics for dax/kmem David Hildenbrand
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=87sf9d26il.fsf@yhuang6-desk2.ccr.corp.intel.com \
--to=ying.huang@intel.com \
--cc=Jonathan.Cameron@Huawei.com \
--cc=akpm@linux-foundation.org \
--cc=aneesh.kumar@linux.ibm.com \
--cc=dan.j.williams@intel.com \
--cc=dave.hansen@linux.intel.com \
--cc=dave.jiang@intel.com \
--cc=david@redhat.com \
--cc=jmoyer@redhat.com \
--cc=linux-cxl@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=nvdimm@lists.linux.dev \
--cc=osalvador@suse.de \
--cc=vishal.l.verma@intel.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