linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Jonathan Cameron <Jonathan.Cameron@Huawei.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>, Huang Ying <ying.huang@intel.com>,
	Dave Hansen <dave.hansen@linux.intel.com>,
	Aneesh Kumar K.V <aneesh.kumar@linux.ibm.com>,
	Michal Hocko <mhocko@suse.com>, Jeff Moyer <jmoyer@redhat.com>
Subject: Re: [PATCH v3 2/2] dax/kmem: allow kmem to add memory with memmap_on_memory
Date: Wed, 2 Aug 2023 15:27:20 +0100	[thread overview]
Message-ID: <20230802152720.00007160@Huawei.com> (raw)
In-Reply-To: <20230801-vv-kmem_memmap-v3-2-406e9aaf5689@intel.com>

On Tue, 01 Aug 2023 23:55:38 -0600
Vishal Verma <vishal.l.verma@intel.com> wrote:

> Large amounts of memory managed by the kmem driver may come in via CXL,
> and it is often desirable to have the memmap for this memory on the new
> memory itself.
> 
> Enroll kmem-managed memory for memmap_on_memory semantics as a default.
> Add a sysfs override under the dax device to opt out of this behavior.
> 
> Cc: Andrew Morton <akpm@linux-foundation.org>
> Cc: David Hildenbrand <david@redhat.com>
> Cc: Michal Hocko <mhocko@suse.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>
> Signed-off-by: Vishal Verma <vishal.l.verma@intel.com>

Hi Vishal,

In general looks fine to me.  Just a question for potential discussion if didn't
miss it in earlier versions.

FWIW
Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>

Also, any docs need updating?  Doesn't seem like the DAX ABI docs are present in
Documentation/ABI so not sure where it should be updated.

Jonathan


>  
> @@ -1400,6 +1435,13 @@ struct dev_dax *devm_create_dev_dax(struct dev_dax_data *data)
>  	dev_dax->align = dax_region->align;
>  	ida_init(&dev_dax->ida);
>  
> +	/*
> +	 * If supported by memory_hotplug, allow memmap_on_memory behavior by
> +	 * default. This can be overridden via sysfs before handing the memory
> +	 * over to kmem if desired.
> +	 */
> +	dev_dax->memmap_on_memory = true;

If there are existing users, then this is a fairly significant change of defaults.
Maybe it should be false and opt in rather than out?

> +
>  	inode = dax_inode(dax_dev);
>  	dev->devt = inode->i_rdev;
>  	dev->bus = &dax_bus_type;




      reply	other threads:[~2023-08-02 14:27 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-02  5:55 [PATCH v3 0/2] mm: use memmap_on_memory semantics for dax/kmem Vishal Verma
2023-08-02  5:55 ` [PATCH v3 1/2] mm/memory_hotplug: split memmap_on_memory requests across memblocks Vishal Verma
2023-08-02 14:20   ` Jonathan Cameron
2023-08-02 15:57     ` Verma, Vishal L
2023-08-02  5:55 ` [PATCH v3 2/2] dax/kmem: allow kmem to add memory with memmap_on_memory Vishal Verma
2023-08-02 14:27   ` Jonathan Cameron [this message]

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=20230802152720.00007160@Huawei.com \
    --to=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=vishal.l.verma@intel.com \
    --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;
as well as URLs for NNTP newsgroup(s).