[PATCH v1 0/4] device-dax: Further improvements to subdivision

From: Joao Martins
Date: Thu Jul 16 2020 - 13:29:45 EST


Hey,

Here's a small set of improvements that I was hoping you would consider as part
of your Soft-Reserved series[0]; should you think they make sense. It does the
following:

Patch 1-2: Add an align sysfs attribute, as opposed to being limited to 2M.
This brings parity to static dax regions, which support 1G.

Patch 3. Add a module parameter to hmem, to initialize the region as idle
with full available_size for child devices. When the region is gonna be
partiotined by default and assigned to guests, doesn't help to
initialize the region. Also if the majority of the region starts
non-idle and it's a region which memmap is bigger than System-Ram,
then there not be enough space for the device to be probed successfully.

Patch 4: Add an sysfs attribute for range allocation. It is a single entry
where you pass a range <start>-<end> and where the ordering plus range
length designate the page_offset. It is meant for recreate the same
mappings after kexec (retaining the GPA->HPA association), but could
also allow application to implement their own allocation strategy.

I will submit a separate daxctl counterpart shortly, to help visualize its use.

[0] https://lore.kernel.org/linux-mm/159457116473.754248.7879464730875147365.stgit@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

Joao

Joao Martins (4):
device-dax: Make align a per-device property
device-dax: Add an 'align' attribute
dax/hmem: Introduce dax_hmem.region_idle parameter
device-dax: Add a range mapping allocation attribute

drivers/dax/bus.c | 166 +++++++++++++++++++++++++++++++++++---
drivers/dax/dax-private.h | 1 +
drivers/dax/device.c | 35 ++++----
drivers/dax/hmem/hmem.c | 5 +-
4 files changed, 177 insertions(+), 30 deletions(-)

--
2.17.1