Re: [PATCH v2 3/3] mm/huge_memory: don't mark refcounted folios special in vmf_insert_folio_pud()

2025-06-11 Thread Dan Williams
pud()") > Signed-off-by: David Hildenbrand Looks good to me. Reviewed-by: Dan Williams

Re: [PATCH v2 2/3] mm/huge_memory: don't mark refcounted folios special in vmf_insert_folio_pmd()

2025-06-11 Thread Dan Williams
th cases using a new simple > "struct folio_or_pfn" structure. > > Use folio_mk_pmd() to create a pmd for a folio cleanly. Looks good, I like copying the sockptr_t approach for this, and agree that this seems to not cause any problems in practice today, but definitely will be a trip hazard going forward. Reviewed-by: Dan Williams

Re: [PATCH v2 1/3] mm/huge_memory: don't ignore queried cachemode in vmf_insert_pfn_pud()

2025-06-11 Thread Dan Williams
of userspace mapping it, right? The change looks good. Reviewed-by: Dan Williams ...but I am struggling with the scenario where this causes problems in practice, where vm_page_prot is the wrong cachemode.

Re: [PATCH v2 0/3] mm/huge_memory: vmf_insert_folio_*() and vmf_insert_pfn_pud() fixes

2025-06-11 Thread Dan Williams
OK 62.27s Ok:12 Fail: 0 Skipped: 1 Full log written to /root/git/ndctl/build/meson-logs/testlog.txt --- Note that the daxctl-create.sh skip is a known unrelated v6.16-rc1 regression fixed with this set: http://lore.kernel.org/20250607033228.1475625-1-dan.j.willi...@intel.com You can add: Tested-by: Dan Williams

Re: [PATCH v3] dt-bindings: pmem: Convert binding to YAML

2025-06-06 Thread Dan Williams
Dan/Dave/Vishal: does it make sense for this pmem binding patch to go > through the nvdimm tree? Ira has been handling nvdimm pull requests as of late. Oliver's ack is sufficient for me. Acked-by: Dan Williams @Ira do you have anything else pending?

Re: [PATCH v1 0/2] mm/huge_memory: don't mark refcounted pages special in vmf_insert_folio_*()

2025-06-05 Thread Dan Williams
exit status 77 12/13 ndctl:dax / dm.sh OK 1.33s 13/13 ndctl:dax / mmap.sh OK 85.12s ...ignore the SKIP, that seems to be caused by an acpi-einj regression. However, how about not duplicating the internals of insert_pfn_p[mu]d() with something

Re: [PATCH] fs/dax: Fix "don't skip locked entries when scanning entries"

2025-05-27 Thread Dan Williams
TASK_UNINTERRUPTIBLE); > - xas_pause(xas); > + xas_reset(xas); > xas_unlock_irq(xas); > schedule(); > finish_wait(wq, &ewait.wait); This looks super-subtle, but so did the original fix commit 6be3e21d25ca ("fs/dax: don't skip locked entries when scanning entries"). The resolution is the same to make sure the xarray state does not mistakenly advance when the lock is dropped. You can add: Reviewed-by: Dan Williams

Re: [PATCH v3] DAX: warn when kmem regions are truncated for memory block alignment.

2025-04-28 Thread Dan Williams
> Suggested-by: David Hildenbrand > Suggested-by: Dan Williams > Reviewed-by: Dan Williams > Tested-by: Alison Schofield > Reviewed-by: Jonathan Cameron > Acked-by: David Hildenbrand > Signed-off-by: Gregory Price Hi Andrew, please pick up this patch: msg-id: 202504

Re: [PATCH v1] fs/dax: fix folio splitting issue by resetting old folio order + _nr_pages

2025-04-17 Thread Dan Williams
Darrick J. Wong wrote: > On Thu, Apr 10, 2025 at 12:12:33PM -0700, Alison Schofield wrote: > > On Thu, Apr 10, 2025 at 11:10:20AM +0200, David Hildenbrand wrote: > > > Alison reports an issue with fsdax when large extends end up using > > > large ZONE_DEVICE folios: > > > > > > > Passes the ndctl/

Re: [PATCH v9 00/19] DCD: Add support for Dynamic Capacity Devices (DCD)

2025-04-15 Thread Dan Williams
Jonathan Cameron wrote: > On Mon, 14 Apr 2025 21:50:31 -0700 > Dan Williams wrote: > > > Jonathan Cameron wrote: > > [..] > > > To me we don't need to answer the question of whether we fully understand > > > requirements, or whether this support covers

Re: [PATCH v9 00/19] DCD: Add support for Dynamic Capacity Devices (DCD)

2025-04-15 Thread Dan Williams
Ira Weiny wrote: [..] > > However, after that, I tried to create a dax device as below, it failed. > > > > root@debian:~# daxctl create-device -r region0 -v > > libdaxctl: __dax_regions_init: no dax regions found via: /sys/class/dax Note that /sys/class/dax support was removed from the kernel bac

Re: [PATCH v9 00/19] DCD: Add support for Dynamic Capacity Devices (DCD)

2025-04-14 Thread Dan Williams
Jonathan Cameron wrote: [..] > To me we don't need to answer the question of whether we fully understand > requirements, or whether this support covers them, but rather to ask > if anyone has requirements that are not sensible to satisfy with additional > work building on this? Wearing only my ups

Re: [PATCH v1] fs/dax: fix folio splitting issue by resetting old folio order + _nr_pages

2025-04-10 Thread Dan Williams
Matthew Wilcox wrote: > On Thu, Apr 10, 2025 at 01:15:07PM -0700, Dan Williams wrote: > > For consistency and clarity what about this incremental change, to make > > the __split_folio_to_order() path reuse folio_reset_order(), and use > > typical bitfield helpers for manipula

Re: [PATCH v1] fs/dax: fix folio splitting issue by resetting old folio order + _nr_pages

2025-04-10 Thread Dan Williams
rge fsdax folio. > > Fixes: 4996fc547f5b ("mm: let _folio_nr_pages overlay memcg_data in first > tail page") > Fixes: 38607c62b34b ("fs/dax: properly refcount fs dax pages") > Reported-by: Alison Schofield > Closes: https://lkml.kernel.org/r/z_w9oeg-d9fhi..

Re: [PATCH v2] DAX: warn when kmem regions are truncated for memory block alignment.

2025-04-09 Thread Dan Williams
> Suggested-by: David Hildenbrand > Suggested-by: Dan Williams > Signed-off-by: Gregory Price The typo in the changelog was already noted, and this addresses all my feedback so feel free to add: Reviewed-by: Dan Williams

Re: [PATCH] DAX: warn when kmem regions are truncated for memory block alignment.

2025-04-01 Thread Dan Williams
David Hildenbrand wrote: > On 21.03.25 19:07, Gregory Price wrote: > > Device capacity intended for use as system ram should be aligned to the > > architecture-defined memory block size or that capacity will be silently > > truncated and capacity stranded. > > > > As hotplug dax memory becomes mor

Re: [RFC 0/4] mm: Remove pfn_t type

2025-01-08 Thread Dan Williams
ttps://github.com/apopple/linux/tree/pfn_t_cleanup > > [1] - > https://lore.kernel.org/linux-mm/cover.425da7c4e76c2749d0ad1734f972b06114e02d52.1736221254.git-series.apop...@nvidia.com/ > [2] - > https://lore.kernel.org/linux-mm/172721874675.497781.3277495908107141898.st...@dwillia2-

Re: [PATCH] dax: Allow block size > PAGE_SIZE

2024-11-12 Thread Dan Williams
Jan Kara wrote: [..] > > I think we should go with that then. Should I send it as Suggested-by: > > Dan or do you want to send it? > > I say go ahead and send it with Dan's suggested-by :) Yeah, no concerns from me, and I can ack it when it comes out.

Re: [PATCH] dax: Allow block size > PAGE_SIZE

2024-11-07 Thread Dan Williams
Asahi Lina wrote: [..] > I don't think that's how it actually works, at least on arm64. > arch_wb_cache_pmem() calls dcache_clean_pop() which is either dc cvap or > dc cvac. Those are trapped by HCR_EL2, and that is never set by KVM. > > There was some discussion of this here: > https://lore.kerne

Re: [PATCH] dax: Allow block size > PAGE_SIZE

2024-11-07 Thread Dan Williams
Jan Kara wrote: > On Wed 06-11-24 11:59:44, Dan Williams wrote: > > Jan Kara wrote: > > [..] > > > > This WARN still feels like the wrong thing, though. Right now it is the > > > > only thing in DAX code complaining on a page size/block size mismatch > &g

Re: [PATCH] dax: Allow block size > PAGE_SIZE

2024-11-06 Thread Dan Williams
Jan Kara wrote: [..] > > This WARN still feels like the wrong thing, though. Right now it is the > > only thing in DAX code complaining on a page size/block size mismatch > > (at least for virtiofs). If this is so important, I feel like there > > should be a higher level check elsewhere, like somet

Re: [PATCH] dax: delete a stale directory pmem

2024-10-17 Thread Dan Williams
, 17 deletions(-) > delete mode 100644 drivers/dax/pmem/Makefile > delete mode 100644 drivers/dax/pmem/pmem.c Oh, indeed, good catch. Reviewed-by: Dan Williams

Re: [PATCH v2 1/2] nvdimm: Fix devs leaks in scan_labels()

2024-08-09 Thread Dan Williams
Dan Williams wrote: [..] > @@ -2036,12 +2038,10 @@ static struct device **scan_labels(struct nd_region > *nd_region) ...of course you would also need something like: if (!count) { kfree(devs); return NULL; } ...here, I'll leave that to you to fix up and test. >

Re: [PATCH v2 1/2] nvdimm: Fix devs leaks in scan_labels()

2024-08-09 Thread Dan Williams
t;] device_add+0x656/0x870 > [<3d69bfaa>] nd_async_device_register+0xe/0x50 [libnvdimm] > [<3f4c52a4>] async_run_entry_fn+0x2e/0x110 > [<e201f4b0>] process_one_work+0x1ee/0x600 > [<6d90d5a9>] worker_thread+0x183/0x350 Thanks for including this. With the above changes you can add: Reviewed-by: Dan Williams

Re: [PATCH] nvdimm: make nd_class constant

2024-06-12 Thread Dan Williams
Greg Kroah-Hartman wrote: > On Mon, Jun 10, 2024 at 10:44:42AM -0700, Dan Williams wrote: > > Greg Kroah-Hartman wrote: > > > Now that the driver core allows for struct class to be in read-only > > > memory, we should make all 'class' structures declared at bu

Re: [PATCH] nvdimm: make nd_class constant

2024-06-10 Thread Dan Williams
hange looks good to me, Reviewed-by: Dan Williams ...changelog grammar tripped me up though, how about: "Now that the driver core allows for struct class to be in read-only memory, it is possible to make all 'class' structures be declared at build time. Move the class to a 'static

Re: [PATCH v2 2/4] dax/bus.c: fix locking for unregister_dax_dev / unregister_dax_mapping paths

2024-04-29 Thread Dan Williams
Verma, Vishal L wrote: > > > @@ -560,15 +551,12 @@ static ssize_t delete_store(struct device *dev, > > > struct device_attribute *attr, > > >   if (!victim) > > >   return -ENXIO; > > >   > > > - rc = down_write_killable(&dax_region_rwsem); > > > - if (rc) > > > - return rc; > > >

Re: [PATCH v2 4/4] dax/bus.c: Use the right locking mode (read vs write) in size_show

2024-04-29 Thread Dan Williams
Vishal Verma wrote: > In size_show(), the dax_dev_rwsem only needs a read lock, but was > acquiring a write lock. Change it to down_read_interruptible() so it > doesn't unnecessarily hold a write lock. > > Cc: Dan Williams > Fixes: c05ae9d85b47 ("dax/bus.c: replace

Re: [PATCH v2 3/4] dax/bus.c: Don't use down_write_killable for non-user processes

2024-04-29 Thread Dan Williams
Vishal Verma wrote: > Change an instance of down_write_killable() to a simple down_write() where > there is no user process that might want to interrupt the operation. > > Fixes: c05ae9d85b47 ("dax/bus.c: replace driver-core lock usage by a local > rwsem") > Reporte

Re: [PATCH v2 2/4] dax/bus.c: fix locking for unregister_dax_dev / unregister_dax_mapping paths

2024-04-29 Thread Dan Williams
c05ae9d85b47 ("dax/bus.c: replace driver-core lock usage by a local > rwsem") > Reported-by: Dan Williams > Signed-off-by: Vishal Verma > --- > drivers/dax/bus.c | 44 ++-- > 1 file changed, 10 insertions(+), 34 deletio

Re: [PATCH v2 1/4] dax/bus.c: replace WARN_ON_ONCE() with lockdep asserts

2024-04-29 Thread Dan Williams
...@dwillia2-mobl3.amr.corp.intel.com.notmuch > [1] > Fixes: c05ae9d85b47 ("dax/bus.c: replace driver-core lock usage by a local > rwsem") > Cc: Andrew Morton > Reported-by: Dan Williams > Signed-off-by: Vishal Verma > --- > drivers/dax/bus.c | 16

Re: [PATCH] dax/bus.c: replace WARN_ON_ONCE() with lockdep asserts

2024-04-03 Thread Dan Williams
E(). > > Link: > https://lore.kernel.org/r/65f0b5ef41817_aa2229...@dwillia2-mobl3.amr.corp.intel.com.notmuch > [1] > Fixes: c05ae9d85b47 ("dax/bus.c: replace driver-core lock usage by a local > rwsem") > Cc: Andrew Morton > Reported-by: Dan Williams > Signed-o

Re: [PATCH v4 02/14] mm: Switch mm->get_unmapped_area() to a flag

2024-03-26 Thread Dan Williams
Rick Edgecombe wrote: > The mm_struct contains a function pointer *get_unmapped_area(), which > is set to either arch_get_unmapped_area() or > arch_get_unmapped_area_topdown() during the initialization of the mm. > > Since the function pointer only ever points to two functions that are named > the

Re: [PATCH v7 1/5] dax/bus.c: replace driver-core lock usage by a local rwsem

2024-03-12 Thread Dan Williams
sult of this > conversion, no device_lock() usage remains in dax/bus.c. > > Cc: Dan Williams > Reported-by: Greg Kroah-Hartman > Signed-off-by: Vishal Verma > --- > drivers/dax/bus.c | 220 > ++ > 1 file changed, 157 i

Re: [PATCH v2] acpi/ghes: Prevent sleeping with spinlock held

2024-02-16 Thread Dan Williams
Ira Weiny wrote: > Ira Weiny wrote: > > Jonathan Cameron wrote: > > > On Wed, 14 Feb 2024 10:23:10 -0500 > > > Steven Rostedt wrote: > > > > > > > On Wed, 14 Feb 2024 12:11:53 + > > > > Jonathan Cameron wrote: > > > > > > > > > So I'm thinking this is a won't fix - wait for the printk rewor

Re: [PATCH v2] acpi/ghes: Prevent sleeping with spinlock held

2024-02-16 Thread Dan Williams
Ira Weiny wrote: [..] > > As Steve said, tp_printk is a hack (a very useful one) and > > hopefully no one runs it in production. > > OMG... I did not realize what tp_printk() was exactly. I should have > looked closer. > > Do we have evidence of its use in production? > > I would love to not h

RE: CPU data cache across reboot/kexec for pmem/dax devices

2024-02-09 Thread Dan Williams
Mathieu Desnoyers wrote: > Hi Dan, > > In the context of extracting user-space trace data when the kernel crashes, > the LTTng user-space tracer recommends using nvdimm/pmem to reserve an area > of physical (volatile) RAM at boot (memmap=nn[KMG]!ss[KMG]), and use the > resulting device to create/m

Re: [RFC PATCH v2 8/8] dax: Fix incorrect list of dcache aliasing architectures

2024-01-30 Thread Dan Williams
nment > > has aliasing dcaches. > > > > Fixes: d92576f1167c ("dax: does not work correctly with virtual aliasing > > caches") > > Signed-off-by: Mathieu Desnoyers > > Cc: Andrew Morton > > Cc: Linus Torvalds > > Cc: linux...@kvack.org &g

Re: [RFC PATCH 0/7] Introduce cache_is_aliasing() to fix DAX regression

2024-01-29 Thread Dan Williams
Mathieu Desnoyers wrote: > This commit introduced in v5.13 prevents building FS_DAX on 32-bit ARM, > even on ARMv7 which does not have virtually aliased dcaches: > > commit d92576f1167c ("dax: does not work correctly with virtual aliasing > caches") > > It used to work fine before: I have custom

Re: [PATCH v6 2/4] dax/bus: Use guard(device) in sysfs attribute helpers

2023-12-15 Thread Dan Williams
f the sysfs attribute writes in > > drivers/dax/bus.c benefit from a cleanup using these, so change these > > where applicable. > > Wait, why are you needing to call device_lock() at all here? Why is dax > special in needing this when no other subsystem requires it? > >

[PATCH] driver core: Add a guard() definition for the device_lock()

2023-12-13 Thread Dan Williams
://lore.kernel.org/r/657897453dda8_269bd29...@dwillia2-mobl3.amr.corp.intel.com.notmuch Link: http://lore.kernel.org/r/6577b0c2a02df_a04c529...@dwillia2-xfh.jf.intel.com.notmuch Cc: Vishal Verma Cc: Ira Weiny Cc: Peter Zijlstra Cc: Greg Kroah-Hartman Cc: Andrew Morton Signed-off-by: Dan Willi

Re: [PATCH v3 2/2] dax: add a sysfs knob to control memmap_on_memory behavior

2023-12-11 Thread Dan Williams
he sysfs control allows the administrator to override the above > > > defaults if needed. > > > > > > Cc: David Hildenbrand > > > Cc: Dan Williams > > > Cc: Dave Jiang > > > Cc: Dave Hansen > > > Cc: Huang Ying > > > Tested-

RE: [PATCH v1 1/1] ACPI: NFIT: Switch to use acpi_evaluate_dsm_typed()

2023-10-19 Thread Dan Williams
Andy Shevchenko wrote: > The acpi_evaluate_dsm_typed() provides a way to check the type of the > object evaluated by _DSM call. Use it instead of open coded variant. Looks good to me. Reviewed-by: Dan Williams

Re: [PATCH v1 1/1] ACPI: NFIT: Switch to use acpi_evaluate_dsm_typed()

2023-10-19 Thread Dan Williams
Wilczynski, Michal wrote: > > > On 10/2/2023 3:54 PM, Andy Shevchenko wrote: > > The acpi_evaluate_dsm_typed() provides a way to check the type of the > > object evaluated by _DSM call. Use it instead of open coded variant. > > > > Signed-off-by: Andy Shevchenko > > --- > > drivers/acpi/nfit/co

Re: [PATCH v3] ACPI: NFIT: Use cleanup.h helpers instead of devm_*()

2023-10-17 Thread Dan Williams
iang > Reviewed-by: Andy Shevchenko > Signed-off-by: Michal Wilczynski > --- > > Dan, would you like me to give you credit for the changelog changes > with Co-developed-by tag ? Nope, this looks good to me, thanks for fixing it up. Reviewed-by: Dan Williams

RE: [PATCH v2 5/6] ACPI: NFIT: Replace acpi_driver with platform_driver

2023-10-17 Thread Dan Williams
Michal Wilczynski wrote: > NFIT driver uses struct acpi_driver incorrectly to register itself. > This is wrong as the instances of the ACPI devices are not meant > to be literal devices, they're supposed to describe ACPI entry of a > particular device. > > Use platform_driver instead of acpi_drive

Re: [PATCH v2] ACPI: NFIT: Fix local use of devm_*()

2023-10-13 Thread Dan Williams
Wilczynski, Michal wrote: > > > On 10/13/2023 7:05 PM, Dan Williams wrote: > > Wilczynski, Michal wrote: > >> On 10/13/2023 6:38 PM, Dan Williams wrote: > >>> Michal Wilczynski wrote: > >>>> devm_*() family of functions purpose is managing m

Re: [PATCH v2] ACPI: NFIT: Fix local use of devm_*()

2023-10-13 Thread Dan Williams
Wilczynski, Michal wrote: > On 10/13/2023 6:38 PM, Dan Williams wrote: > > Michal Wilczynski wrote: > >> devm_*() family of functions purpose is managing memory attached to a > >> device. So in general it should only be used for allocations that should > >>

Re: [PATCH v2] ACPI: NFIT: Fix local use of devm_*()

2023-10-13 Thread Dan Williams
Michal Wilczynski wrote: > devm_*() family of functions purpose is managing memory attached to a > device. So in general it should only be used for allocations that should > last for the whole lifecycle of the device. No, this assertion is not accurate, if it were strictly true then devm_kfree()

RE: [PATCH v1 1/2] ACPI: NFIT: Fix memory leak, and local use of devm_*()

2023-10-12 Thread Dan Williams
Michal Wilczynski wrote: > devm_*() family of functions purpose is managing memory attached to a > device. So in general it should only be used for allocations that should > last for the whole lifecycle of the device. This is not the case for > acpi_nfit_init_interleave_set(). There are two allocat

RE: [PATCH v5 1/2] mm/memory_hotplug: split memmap_on_memory requests across memblocks

2023-10-05 Thread Dan Williams
ight have been split up into memblock sized chunks, > and to loop through those as needed. > > Cc: Andrew Morton > Cc: David Hildenbrand > Cc: Michal Hocko > Cc: Oscar Salvador > Cc: Dan Williams > Cc: Dave Jiang > Cc: Dave Hansen > Cc: Huang Ying >

RE: [PATCH v5 2/2] dax/kmem: allow kmem to add memory with memmap_on_memory

2023-10-05 Thread Dan Williams
gt; Cc: Michal Hocko > Cc: Oscar Salvador > Cc: Dan Williams > Cc: Dave Jiang > Cc: Dave Hansen > Cc: Huang Ying > Reviewed-by: Jonathan Cameron > Reviewed-by: David Hildenbrand > Signed-off-by: Vishal Verma > --- > drivers/dax/bus.h | 1

Re: [PATCH v1 9/9] ACPI: NFIT: Don't use KBUILD_MODNAME for driver name

2023-09-25 Thread Dan Williams
Andy Shevchenko wrote: > On Mon, Sep 25, 2023 at 05:48:42PM +0300, Michal Wilczynski wrote: > > Driver name is part of the ABI, so it should be hard-coded, as ABI > > should be always kept backward compatible. Prevent ABI from changing > > accidentally in case KBUILD_MODNAME change. > > This is up

RE: [PATCH] drivers: nvdimm: fix dereference after free

2023-08-17 Thread Dan Williams
[ add Kajol ] Konstantin Meskhidze wrote: > 'nd_pmu->pmu.attr_groups' is dereferenced in function > 'nvdimm_pmu_free_hotplug_memory' call after it has been freed. Because in > function 'nvdimm_pmu_free_hotplug_memory' memory pointed by the fields of > 'nd_pmu->pmu.attr_groups' is deallocated it is

RE: [PATCH] drivers: nvdimm: fix memleak

2023-08-17 Thread Dan Williams
[ add Kajol and Madhavan ] Konstantin Meskhidze wrote: > Memory pointed by 'nd_pmu->pmu.attr_groups' is allocated in function > 'register_nvdimm_pmu' and is lost after 'kfree(nd_pmu)' call in function > 'unregister_nvdimm_pmu'. Yes, looks like a real issue, but also completely avoidable by using

Re: [PATCH v5 09/10] acpi/nfit: Move handler installing logic to driver

2023-06-30 Thread Dan Williams
Wilczynski, Michal wrote: > > > On 6/29/2023 10:54 PM, Dan Williams wrote: > > Michal Wilczynski wrote: > >> Currently logic for installing notifications from ACPI devices is > >> implemented using notify callback in struct acpi_driver. Preparations > >

RE: [PATCH v5 09/10] acpi/nfit: Move handler installing logic to driver

2023-06-29 Thread Dan Williams
Michal Wilczynski wrote: > Currently logic for installing notifications from ACPI devices is > implemented using notify callback in struct acpi_driver. Preparations > are being made to replace acpi_driver with more generic struct > platform_driver, which doesn't contain notify callback. Furthermore

RE: [PATCH v5 08/10] acpi/nfit: Improve terminator line in acpi_nfit_ids

2023-06-29 Thread Dan Williams
Michal Wilczynski wrote: > Currently terminator line contains redunant characters. Remove them and > also remove a comma at the end. > > Signed-off-by: Michal Wilczynski > --- > drivers/acpi/nfit/core.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/acpi/nfit/c

Re: [v5 0/1] dax: enable dax fault handler to report VM_FAULT_HWPOISON

2023-06-27 Thread Dan Williams
Markus Elfring wrote: > >> Would you insist on the usage of cover letters also for single patches? > > > > I would neither insist on it, nor prohibit it. > > It seems that you can tolerate an extra message here. > > > > It simply does not make enough difference. > > Can it occasionally be a bit

RE: [PATCH v5 1/1] dax: enable dax fault handler to report VM_FAULT_HWPOISON

2023-06-24 Thread Dan Williams
erted to EIO to maintain block API consistency. > > Signed-off-by: Jane Chu Reviewed-by: Dan Williams

RE: [PATCH v4 1/1] dax: enable dax fault handler to report VM_FAULT_HWPOISON

2023-06-08 Thread Dan Williams
Jane Chu wrote: > When multiple processes mmap() a dax file, then at some point, > a process issues a 'load' and consumes a hwpoison, the process > receives a SIGBUS with si_code = BUS_MCEERR_AR and with si_lsb > set for the poison scope. Soon after, any other process issues > a 'load' to the poiso

Re: [PATCH] dax/hmem: Fix refcount leak in dax_hmem_probe()

2023-06-02 Thread Dan Williams
Paul Cassella wrote: > On Fri, 2 Jun 2023, Ira Weiny wrote: > > Paul Cassella wrote: > > > On Sat, 3 Dec 2022, Ira Weiny wrote: > > > > On Sat, Dec 03, 2022 at 09:58:58AM +, Yongqiang Liu wrote: > > > > > > We should always call dax_region_put() whenever devm_create_dev_dax() > > > > > succeed

RE: [PATCH] dax: fix missing-prototype warnings

2023-05-18 Thread Dan Williams
Arnd Bergmann wrote: > From: Arnd Bergmann > > dev_dax_probe declaration for this function was removed with the only > caller outside of device.c. Mark it static to avoid a W=1 > warning: > drivers/dax/device.c:399:5: error: no previous prototype for 'dev_dax_probe' > > Similarly, run_dax() caus

RE: [PATCH v3] dax: enable dax fault handler to report VM_FAULT_HWPOISON

2023-05-04 Thread Dan Williams
Jane Chu wrote: > When multiple processes mmap() a dax file, then at some point, > a process issues a 'load' and consumes a hwpoison, the process > receives a SIGBUS with si_code = BUS_MCEERR_AR and with si_lsb > set for the poison scope. Soon after, any other process issues > a 'load' to the poiso

Re: [PATCH v2] dax: enable dax fault handler to report VM_FAULT_HWPOISON

2023-04-27 Thread Dan Williams
Matthew Wilcox wrote: > On Thu, Apr 27, 2023 at 06:35:57PM -0700, Dan Williams wrote: > > Jane Chu wrote: > > > Hi, Dan, > > > > > > On 4/27/2023 2:36 PM, Dan Williams wrote: > > > > Jane Chu wrote: > > > >> When dax fault handler

Re: [PATCH v2] dax: enable dax fault handler to report VM_FAULT_HWPOISON

2023-04-27 Thread Dan Williams
Jane Chu wrote: > Hi, Dan, > > On 4/27/2023 2:36 PM, Dan Williams wrote: > > Jane Chu wrote: > >> When dax fault handler fails to provision the fault page due to > >> hwpoison, it returns VM_FAULT_SIGBUS which lead to a sigbus delivered > >> to usersp

RE: [PATCH v2] dax: enable dax fault handler to report VM_FAULT_HWPOISON

2023-04-27 Thread Dan Williams
Jane Chu wrote: > When dax fault handler fails to provision the fault page due to > hwpoison, it returns VM_FAULT_SIGBUS which lead to a sigbus delivered > to userspace with .si_code BUS_ADRERR. Channel dax backend driver's > detection on hwpoison to the filesystem to provide the precise reason >

Re: [PATCH] nvdimm: nvdimm_bus_register: Avoid adding device to the unregistered bus

2023-03-20 Thread Dan Williams
lizhij...@fujitsu.com wrote: [..] > > Now I do think it would be a good idea to fail device_add() if the bus > > is not registered, > > BTW, below line 369: device_add() didn't fail in practical. > I think that's ok because the device gets added, but never probed due to this part of that commit

Re: [PATCH] nvdimm: nvdimm_bus_register: Avoid adding device to the unregistered bus

2023-03-20 Thread Dan Williams
lizhij...@fujitsu.com wrote: [..] > >> Dan, > >> > >> Configure the kconfig with ACPI_NFIT [=m] && LIBNVDIMM [=y], and add extra > >> kernel booting parameter > >> 'initcall_blacklist=libnvdimm_init'. Then kernel panic! > > > > That's expected though, > > Do you mean we just keep it as it is. Y

Re: [PATCH] nvdimm: nvdimm_bus_register: Avoid adding device to the unregistered bus

2023-03-16 Thread Dan Williams
lizhij...@fujitsu.com wrote: > > > On 16/03/2023 23:54, Dan Williams wrote: > > Li Zhijian wrote: > >> nvdimm_bus_register() could be called from other modules, such as nfit, > >> but it can only be called after the nvdimm_bus_type is registered. > >> &

Re: [PATCH] nvdimm: nvdimm_bus_register: Avoid adding device to the unregistered bus

2023-03-16 Thread Dan Williams
lizhij...@fujitsu.com wrote: > > > On 16/03/2023 23:54, Dan Williams wrote: > > Li Zhijian wrote: > >> nvdimm_bus_register() could be called from other modules, such as nfit, > >> but it can only be called after the nvdimm_bus_type is registered. > >> &

RE: [PATCH] nvdimm: nvdimm_bus_register: Avoid adding device to the unregistered bus

2023-03-16 Thread Dan Williams
Li Zhijian wrote: > nvdimm_bus_register() could be called from other modules, such as nfit, > but it can only be called after the nvdimm_bus_type is registered. > > BUG: kernel NULL pointer dereference, address: 0098 > #PF: supervisor read access in kernel mode > #PF: error_code(0x0

[GIT PULL] Compute Express Link (CXL) for 6.3

2023-02-21 Thread Dan Williams
ing uninitialized error code dax: cxl: add CXL_REGION dependency dax/hmem: build hmem device support as module if possible Dan Williams (35): cxl/pci: Move tracepoint definitions to drivers/cxl/core/ tools/testing/cxl: Prevent cxl_test from confusing production modules

RE: [PATCH] dax: clx: add CXL_REGION dependency

2023-02-14 Thread Dan Williams
Arnd Bergmann wrote: > From: Arnd Bergmann > > There is already a dependency on CXL_REGION, which depends on CXL_BUS, > but since CXL_REGION is a 'bool' symbol, it's possible to configure > DAX as built-in even though CXL itself is a loadable module: > > x86_64-linux-ld: drivers/dax/cxl.o: in fu

[GIT PULL] Compute Express Link (CXL) fixes for 6.2-final

2023-02-10 Thread Dan Williams
Dan Williams (1): cxl/region: Fix passthrough-decoder detection Fan Ni (1): cxl/region: Fix null pointer dereference for resetting decoder drivers/cxl/core/region.c | 12 +++- 1 file changed, 7 insertions(+), 5 deletions(-)

[GIT PULL] NVDIMM and DAX fixes for 6.2-final

2023-02-10 Thread Dan Williams
6.2 - Resolve the conflict between KMSAN and NVDIMM with respect to reserving pmem namespace / volume capacity for larger sizeof(struct page) - Fix a lockdep warning in the the NFIT code - Fix a kernel-doc build warning ---- Dan Williams

[GIT PULL] Compute Express Link (CXL) fixes for 6.2-rc6

2023-01-28 Thread Dan Williams
Dan Williams (1): cxl/pmem: Fix nvdimm unregistration when cxl_pmem driver is absent Dave Jiang (1): cxl: fix cxl_report_and_clear() RAS UE addr mis-assignment drivers/cxl/acpi.c | 1 - drivers/cxl/core/pmem.c | 42

RE: [PATCH] dax: super.c: fix kernel-doc bad line warning

2023-01-25 Thread Dan Williams
Randy Dunlap wrote: > Convert an empty line to " *" to avoid a kernel-doc warning: > > drivers/dax/super.c:478: warning: bad line: > > Signed-off-by: Randy Dunlap > Cc: Dan Williams > Cc: Vishal Verma > Cc: Dave Jiang > Cc: nvd...@lists.linux.dev > -

[PATCH v2] nvdimm: Support sizeof(struct page) > MAX_STRUCT_PAGE_SIZE

2023-01-25 Thread Dan Williams
Commit 6e9f05dc66f9 ("libnvdimm/pfn_dev: increase MAX_STRUCT_PAGE_SIZE") ...updated MAX_STRUCT_PAGE_SIZE to account for sizeof(struct page) potentially doubling in the case of CONFIG_KMSAN=y. Unfortunately this doubles the amount of capacity stolen from user addressable capacity for everyone, rega

RE: [PATCH] ACPI: NFIT: fix a potential deadlock during NFIT teardown

2023-01-25 Thread Dan Williams
need to be done under > acpi_desc->init_mutex. Move cancel_delayed_work_sync() outside the > init_mutex to fix the deadlock. Any work that starts after > acpi_nfit_shutdown() drops the lock will see ARS_CANCEL, and the > cancel_delayed_work_sync() will safely flush it out. > >

RE: [PATCH v2] nvdimm: Use kstrtobool() instead of strtobool()

2023-01-25 Thread Dan Williams
Christophe JAILLET wrote: > strtobool() is the same as kstrtobool(). > However, the latter is more used within the kernel. > > In order to remove strtobool() and slightly simplify kstrtox.h, switch to > the other function name. > > While at it, include the corresponding header file () > > Signed

RE: [PATCH rcu 11/27] drivers/dax: Remove "select SRCU"

2023-01-05 Thread Dan Williams
Paul E. McKenney wrote: > Now that the SRCU Kconfig option is unconditionally selected, there is > no longer any point in selecting it. Therefore, remove the "select SRCU" > Kconfig statements. > > Signed-off-by: Paul E. McKenney > Cc: Dan Williams > Cc: Visha

[GIT PULL] Compute Express Link (CXL) for 6.2

2022-12-10 Thread Dan Williams
(1): cxl/region: Fix spelling mistake "memergion" -> "memregion" Dan Williams (34): tools/testing/cxl: Add bridge mocking support cxl/acpi: Simplify cxl_nvdimm_bridge probing cxl/region: Drop redundant pmem region release handling cxl/pmem: Refac

[GIT PULL] DAX and HMAT fixes for v6.1-rc8

2022-12-02 Thread Dan Williams
node targets in the sysfs representation of memory tiers - Remove a confusing variable initialization -------- Dan Williams (1): device-dax: Fix duplicate 'hmem' device registration Vishal Verma (2): ACPI: HMAT: remo

RE: [PATCH v2.1 1/8] fsdax: introduce page->share for fsdax in reflink mode

2022-12-02 Thread Dan Williams
Shiyang Ruan wrote: > fsdax page is used not only when CoW, but also mapread. To make the it > easily understood, use 'share' to indicate that the dax page is shared > by more than one extent. And add helper functions to use it. > > Also, the flag needs to be renamed to PAGE_MAPPING_DAX_SHARED. >

RE: [PATCH v2 0/8] fsdax,xfs: fix warning messages

2022-12-02 Thread Dan Williams
Shiyang Ruan wrote: > Changes since v1: > 1. Added a snippet of the warning message and some of the failed cases > 2. Separated the patch for easily review > 3. Added page->share and its helper functions > 4. Included the patch[1] that removes the restrictions of fsdax and reflink > [1] > http

Re: [PATCH 0/2] fsdax,xfs: fix warning messages

2022-11-30 Thread Dan Williams
Darrick J. Wong wrote: > On Wed, Nov 30, 2022 at 01:48:59PM -0800, Dan Williams wrote: > > Andrew Morton wrote: > > > On Tue, 29 Nov 2022 19:59:14 -0800 Dan Williams > > > wrote: > > > > > > > [ add Andrew ] > > > > > > >

Re: [PATCH 0/2] fsdax,xfs: fix warning messages

2022-11-30 Thread Dan Williams
Andrew Morton wrote: > On Tue, 29 Nov 2022 19:59:14 -0800 Dan Williams > wrote: > > > [ add Andrew ] > > > > Shiyang Ruan wrote: > > > Many testcases failed in dax+reflink mode with warning message in dmesg. > > > This also effects dax+norefl

Re: [PATCH 0/2] fsdax,xfs: fix warning messages

2022-11-29 Thread Dan Williams
Darrick J. Wong wrote: > On Tue, Nov 29, 2022 at 07:59:14PM -0800, Dan Williams wrote: > > [ add Andrew ] > > > > Shiyang Ruan wrote: > > > Many testcases failed in dax+reflink mode with warning message in dmesg. > > > This also effects dax+noreflink mo

RE: [PATCH 1/2] fsdax,xfs: fix warning messages at dax_[dis]associate_entry()

2022-11-29 Thread Dan Williams
Shiyang Ruan wrote: > This patch fixes the warning message reported in dax_associate_entry() > and dax_disassociate_entry(). Can you include the xfstest test number and a snippet of the warning message. > 1. reset page->mapping and ->index when refcount counting down to 0. > 2. set IOMAP_F_SHARED

RE: [PATCH 0/2] fsdax,xfs: fix warning messages

2022-11-29 Thread Dan Williams
[ add Andrew ] Shiyang Ruan wrote: > Many testcases failed in dax+reflink mode with warning message in dmesg. > This also effects dax+noreflink mode if we run the test after a > dax+reflink test. So, the most urgent thing is solving the warning > messages. > > Patch 1 fixes some mistakes and add

[PATCH v6] memregion: Add cpu_cache_invalidate_memregion() interface

2022-11-14 Thread Dan Williams
eter Zijlstra Tested-by: Dave Jiang Signed-off-by: Davidlohr Bueso Acked-by: Dave Hansen Co-developed-by: Dan Williams Signed-off-by: Dan Williams --- Changes since v5 [1]: - A collection of build fixed reported by the 0day build robot [1]: http://lore.kernel.org/r/166698148737.3132474.5901

[PATCH v5] memregion: Add cpu_cache_invalidate_memregion() interface

2022-10-28 Thread Dan Williams
Peter Zijlstra Signed-off-by: Davidlohr Bueso Acked-by: Dave Hansen Co-developed-by: Dan Williams Signed-off-by: Dan Williams --- Changes since v4 [1]: - Changelog and kdoc wording fixes (Dave) - Permit x86-32 as there is no functional reason to disallow it, and the DEVMEM namespace handles limit

Re: [PATCH v4] memregion: Add cpu_cache_invalidate_memregion() interface

2022-10-27 Thread Dan Williams
Dave Hansen wrote: > On 10/25/22 13:05, Dan Williams wrote: > > Users must first call cpu_cache_has_invalidate_memregion() to know whether > > this functionality is available on the architecture. Only enable it on > > x86-64 via the wbinvd() hammer. Hypervisors are not suppor

Re: [PATCH v1] virtio_pmem: populate numa information

2022-10-26 Thread Dan Williams
Pankaj Gupta wrote: > > > > Compute the numa information for a virtio_pmem device from the memory > > > > range of the device. Previously, the target_node was always 0 since > > > > the ndr_desc.target_node field was never explicitly set. The code for > > > > computing the numa node is taken from c

[PATCH v4] memregion: Add cpu_cache_invalidate_memregion() interface

2022-10-25 Thread Dan Williams
Cc: Andy Lutomirski Cc: Peter Zijlstra Signed-off-by: Davidlohr Bueso Co-developed-by: Dan Williams Signed-off-by: Dan Williams --- Changes since v3: https://lore.kernel.org/r/20220919110605.3696-1-d...@stgolabs.net - Add more details about the use of this facility in the memory provisioni

RE: [PATCH v3 -next] memregion: Add cpu_cache_invalidate_memregion() interface

2022-10-22 Thread Dan Williams
[ add the rest of the X86 MM maintainers, Dave and Andy ] Davidlohr Bueso wrote: > With CXL security features, global CPU cache flushing nvdimm requirements > are no longer specific to that subsystem, even beyond the scope of > security_ops. CXL will need such semantics for features not necessaril

[GIT PULL] NVDIMM for 6.1

2022-10-14 Thread Dan Williams
id_null only once in nd_dev_to_uuid() nvdimm/namespace: drop unneeded temporary variable in size_store() Bo Liu (1): dax: Remove usage of the deprecated ida_simple_xxx API Dan Williams (1): Merge branch 'for-6.1/nvdimm' into libnvdimm-for-next Jason Wang (1): nvdimm/namesp

RE: [PATCH] dax: Remove usage of the deprecated ida_simple_xxx API

2022-09-29 Thread Dan Williams
Bo Liu wrote: > Use ida_alloc_xxx()/ida_free() instead of > ida_simple_get()/ida_simple_remove(). > The latter is deprecated and more verbose. The better justification is: ida_alloc_max() makes it clear that the second argument is inclusive, and the alloc/free terminology is more idiomatic and sy

Re: [PATCH v2] libnvdimm/region: Allow setting align attribute on regions without mappings

2022-09-29 Thread Dan Williams
Tyler Hicks wrote: > On 2022-09-26 16:18:18, Jeff Moyer wrote: > > Tyler Hicks writes: > > > > > The alignment constraint for namespace creation in a region was > > > increased, from 2M to 16M, for non-PowerPC architectures in v5.7 with > > > commit 2522afb86a8c ("libnvdimm/region: Introduce an '

  1   2   3   4   5   6   7   8   9   10   >