From: "Verma, Vishal L" <vishal.l.verma@intel.com>
To: "Williams, Dan J" <dan.j.williams@intel.com>,
"Jiang, Dave" <dave.jiang@intel.com>,
"osalvador@suse.de" <osalvador@suse.de>,
"david@redhat.com" <david@redhat.com>,
"akpm@linux-foundation.org" <akpm@linux-foundation.org>
Cc: "dave.hansen@linux.intel.com" <dave.hansen@linux.intel.com>,
"Huang, Ying" <ying.huang@intel.com>,
"linux-mm@kvack.org" <linux-mm@kvack.org>,
"aneesh.kumar@linux.ibm.com" <aneesh.kumar@linux.ibm.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"linux-cxl@vger.kernel.org" <linux-cxl@vger.kernel.org>,
"Hocko, Michal" <mhocko@suse.com>,
"nvdimm@lists.linux.dev" <nvdimm@lists.linux.dev>,
"jmoyer@redhat.com" <jmoyer@redhat.com>,
"Jonathan.Cameron@huawei.com" <Jonathan.Cameron@huawei.com>
Subject: Re: [PATCH v5 1/2] mm/memory_hotplug: split memmap_on_memory requests across memblocks
Date: Fri, 6 Oct 2023 16:46:18 +0000 [thread overview]
Message-ID: <a6cb3c36069e2aaf9ce486c68ee4cb0973dd6b70.camel@intel.com> (raw)
In-Reply-To: <651f28b87e6a8_ae7e7294b8@dwillia2-xfh.jf.intel.com.notmuch>
On Thu, 2023-10-05 at 14:20 -0700, Dan Williams wrote:
> Vishal Verma wrote:
<..>
> >
> > --- a/mm/memory_hotplug.c
> > +++ b/mm/memory_hotplug.c
> > @@ -1380,6 +1380,44 @@ static bool mhp_supports_memmap_on_memory(unsigned long size)
> > return arch_supports_memmap_on_memory(vmemmap_size);
> > }
> >
> > +static int add_memory_create_devices(int nid, struct memory_group *group,
> > + u64 start, u64 size, mhp_t mhp_flags)
> > +{
> > + struct mhp_params params = { .pgprot = pgprot_mhp(PAGE_KERNEL) };
> > + struct vmem_altmap mhp_altmap = {
> > + .base_pfn = PHYS_PFN(start),
> > + .end_pfn = PHYS_PFN(start + size - 1),
> > + };
> > + int ret;
> > +
> > + if ((mhp_flags & MHP_MEMMAP_ON_MEMORY)) {
> > + mhp_altmap.free = memory_block_memmap_on_memory_pages();
> > + params.altmap = kmalloc(sizeof(struct vmem_altmap), GFP_KERNEL);
> > + if (!params.altmap)
> > + return -ENOMEM;
> > +
> > + memcpy(params.altmap, &mhp_altmap, sizeof(mhp_altmap));
>
> Isn't this just open coded kmemdup()?
Ah yes - it was existing code that I just moved, but I can add a
precursor cleanup patch to change it.
>
> Other than that, I am not seeing anything else to comment on, you can add:
>
> Reviewed-by: Dan Williams <dan.j.williams@intel.com>
Thanks Dan!
next prev parent reply other threads:[~2023-10-06 16:46 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-05 18:31 [PATCH v5 0/2] mm: use memmap_on_memory semantics for dax/kmem Vishal Verma
2023-10-05 18:31 ` [PATCH v5 1/2] mm/memory_hotplug: split memmap_on_memory requests across memblocks Vishal Verma
2023-10-05 21:20 ` Dan Williams
2023-10-06 16:46 ` Verma, Vishal L [this message]
2023-10-06 12:52 ` David Hildenbrand
2023-10-06 22:01 ` Verma, Vishal L
2023-10-09 15:15 ` David Hildenbrand
2023-10-07 8:55 ` Huang, Ying
2023-10-09 15:04 ` David Hildenbrand
2023-10-12 5:53 ` Verma, Vishal L
2023-10-12 8:40 ` David Hildenbrand
2023-10-16 18:19 ` Verma, Vishal L
2023-10-05 18:31 ` [PATCH v5 2/2] dax/kmem: allow kmem to add memory with memmap_on_memory Vishal Verma
2023-10-05 21:16 ` Dan Williams
2023-10-17 0:31 ` Verma, Vishal L
2023-10-17 5:18 ` Huang, Ying
2023-10-17 5:44 ` Verma, Vishal L
2023-10-17 5:54 ` Huang, Ying
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=a6cb3c36069e2aaf9ce486c68ee4cb0973dd6b70.camel@intel.com \
--to=vishal.l.verma@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=mhocko@suse.com \
--cc=nvdimm@lists.linux.dev \
--cc=osalvador@suse.de \
--cc=ying.huang@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