All of lore.kernel.org
 help / color / mirror / Atom feed
From: Shyam Saini <shyamsaini@linux.microsoft.com>
To: dan.j.williams@intel.com
Cc: akpm@linux-foundation.org, david@redhat.com,
	iamjoonsoo.kim@lge.com, james.morse@arm.com, jgg@ziepe.ca,
	jmorris@namei.org, linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org, linux-mm@kvack.org, maz@kernel.org,
	mhocko@suse.com, osalvador@suse.de, pasha.tatashin@soleen.com,
	sashal@kernel.org, tyhicks@linux.microsoft.com, vbabka@suse.cz,
	will.deacon@arm.com, code@tyhicks.com, srivatsa@csail.mit.edu,
	apais@linux.microsoft.com, vijayb@linux.microsoft.com,
	tballasi@linux.microsoft.com, bboscaccy@linux.microsoft.com
Subject: dax alignment problem on arm64 (and other achitectures)
Date: Wed, 26 Jun 2024 00:20:38 -0700	[thread overview]
Message-ID: <20240626072038.1419889-1-shyamsaini@linux.microsoft.com> (raw)
In-Reply-To: <CAPcyv4jLmDvQ+e7QSQjOsAccSnhpvm9J5kHsA1OCXcaOm7BrMA@mail.gmail.com>

Hi Dan,

Restarting this thread to get more insights about dax alignment problem.
So having a devdax pmem of size 128M is [1] not usable and entire memory
is wasted? For 256M size devdax pmem, again 126M seems to be wasted and
only 128M can be hot added/removed. This was observed on ARM64 platform.

do we have any potential or existing solution for this problem ?

> >
> > > Since we last talked about this the enabling for EFI "Special Purpose"
> > > / Soft Reserved Memory has gone upstream and instantiates device-dax
> > > instances for address ranges marked with EFI_MEMORY_SP attribute.
> > > Critically this way of declaring device-dax removes the consideration
> > > of it as persistent memory and as such no metadata reservation. So, if
> > > you are willing to maintain the metadata external to the device (which
> > > seems reasonable for your environment) and have your platform firmware
> > > / kernel command line mark it as EFI_CONVENTIONAL_MEMORY +
> > > EFI_MEMORY_SP, then these reserve-free dax-devices will surface.
> >
> > Hi Dan,
> >
> > This is cool. Does it allow conversion between devdax and fsdax so DAX
> > aware filesystem can be installed and data can be put there to be
> > preserved across the reboot?
> >
> 
> It does not because it's not "pmem" by this designation.
> 
> Instead if you want fsdax, zero metadata on the device, and the
> ability to switch from fsdax to devdax I think that could be achieved
> with a new sysfs attribute at the region-device level. Currently the
> mode of a namespace with no metadata on it defaults to "raw" mode
> where "raw" treats the pmem as a persistent memory block device with
> no DAX capability. There's no reason the default could instead be
> devdax with pages mapped.
> 
> Something like:
> ndctl disable-region region0
> echo 1 > /sys/bus/nd/devices/region0/pagemap
> echo devdax > /sys/bus/nd/devices/region0/raw_default

this interface file seems to be not available

can we use sub-section hotplug feature here, there aren't much details available
about using that, is it via sysfs ?

I appreciate your help and guidance on this.

Thanks,
Shyam

[1] https://elixir.bootlin.com/linux/v6.10-rc5/source/drivers/dax/kmem.c#L102


      reply	other threads:[~2024-06-26  7:21 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-27 20:43 dax alignment problem on arm64 (and other achitectures) Pavel Tatashin
2021-01-27 20:43 ` Pavel Tatashin
2021-01-27 21:09 ` David Hildenbrand
2021-01-27 21:09   ` David Hildenbrand
2021-01-27 21:49   ` Pavel Tatashin
2021-01-27 21:49     ` Pavel Tatashin
2021-01-27 22:18     ` David Hildenbrand
2021-01-27 22:18       ` David Hildenbrand
2021-01-27 23:33       ` Pavel Tatashin
2021-01-27 23:33         ` Pavel Tatashin
2021-01-28 15:03         ` David Hildenbrand
2021-01-28 15:03           ` David Hildenbrand
2021-01-29  2:06           ` Pavel Tatashin
2021-01-29  2:06             ` Pavel Tatashin
2021-01-29 13:19             ` David Hildenbrand
2021-01-29 13:19               ` David Hildenbrand
2021-01-29 16:24               ` Pavel Tatashin
2021-01-29 16:24                 ` Pavel Tatashin
2021-01-29 19:06                 ` Pavel Tatashin
2021-01-29 19:06                   ` Pavel Tatashin
2021-01-29 19:12                   ` Pavel Tatashin
2021-01-29 19:12                     ` Pavel Tatashin
2021-01-29 19:41                     ` Pavel Tatashin
2021-01-29 19:41                       ` Pavel Tatashin
2021-01-29  2:55     ` Dan Williams
2021-01-29  2:55       ` Dan Williams
2021-01-29 13:50       ` Pavel Tatashin
2021-01-29 13:50         ` Pavel Tatashin
2021-01-29 14:50         ` Joao Martins
2021-01-29 14:50           ` Joao Martins
2021-01-29 16:32           ` Pavel Tatashin
2021-01-29 16:32             ` Pavel Tatashin
2021-01-29 17:22             ` Joao Martins
2021-01-29 17:22               ` Joao Martins
2021-01-29 20:26         ` Dan Williams
2021-01-29 20:26           ` Dan Williams
2024-06-26  7:20           ` Shyam Saini [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=20240626072038.1419889-1-shyamsaini@linux.microsoft.com \
    --to=shyamsaini@linux.microsoft.com \
    --cc=akpm@linux-foundation.org \
    --cc=apais@linux.microsoft.com \
    --cc=bboscaccy@linux.microsoft.com \
    --cc=code@tyhicks.com \
    --cc=dan.j.williams@intel.com \
    --cc=david@redhat.com \
    --cc=iamjoonsoo.kim@lge.com \
    --cc=james.morse@arm.com \
    --cc=jgg@ziepe.ca \
    --cc=jmorris@namei.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=maz@kernel.org \
    --cc=mhocko@suse.com \
    --cc=osalvador@suse.de \
    --cc=pasha.tatashin@soleen.com \
    --cc=sashal@kernel.org \
    --cc=srivatsa@csail.mit.edu \
    --cc=tballasi@linux.microsoft.com \
    --cc=tyhicks@linux.microsoft.com \
    --cc=vbabka@suse.cz \
    --cc=vijayb@linux.microsoft.com \
    --cc=will.deacon@arm.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.