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(_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
> > 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-off-by

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

2024-03-27 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 >

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

2024-03-12 Thread Dan Williams
As a result 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

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

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

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

2024-01-30 Thread Dan Williams
> > 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

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

2023-12-15 Thread Dan Williams
ysfs 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
ontrol 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-by: Li Zhi

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 > > --- > >

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

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 managin

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

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

2023-10-05 Thread Dan Williams
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 > Suggested-by: David

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

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

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.

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

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

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

2023-06-24 Thread Dan Williams
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

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() > > > > >

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()

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

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 han

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.

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

2023-03-17 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:

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

2023-02-21 Thread Dan Williams
ror 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 cxl/region: C

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

[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,

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

2023-01-25 Thread Dan Williams
x. 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. > > Reported-by: Dan Williams > Signed-off-by: Vishal Verm

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 () > >

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
ts 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: remove unnecessary varia

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] >

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

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

[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
Cc: 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

[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 provis

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

[GIT PULL] NVDIMM for 6.1

2022-10-14 Thread Dan Williams
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/namespace: Fix comment typo Jiapeng

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

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

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

2022-09-24 Thread Dan Williams
: drop nested variable in create_namespace_pmem() Dan Williams (2): devdax: Fix soft-reservation memory description Merge branch 'for-6.0/dax' into libnvdimm-fixes Jane Chu (1): pmem: fix a name collision Li Jinlin (1): fsdax: Fix infinite loop in dax_iomap_rw() Shivaprasad

RE: [PATCH] dax: Check dev_set_name() return value

2022-09-20 Thread Dan Williams
Bo Liu wrote: > It's possible that dev_set_name() returns -ENOMEM, catch and handle this. > > Signed-off-by: Bo Liu > --- > drivers/dax/bus.c | 11 +-- > 1 file changed, 9 insertions(+), 2 deletions(-) > > diff --git a/drivers/dax/bus.c b/drivers/dax/bus.c > index

RE: [PATCH] nvdimm: Call ida_simple_remove() when failed

2022-09-20 Thread Dan Williams
Bo Liu wrote: > In function nvdimm_bus_register(), when code execution fails, we should > call ida_simple_remove() to free ida. > > Signed-off-by: Bo Liu > --- > drivers/nvdimm/bus.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/drivers/nvdimm/bus.c b/drivers/nvdimm/bus.c > index

Re: [PATCH -next] memregion: Add arch_flush_memregion() interface

2022-09-08 Thread Dan Williams
Andrew Morton wrote: > On Thu, 8 Sep 2022 15:51:50 -0700 Dan Williams > wrote: > > > Jonathan Cameron wrote: > > > On Wed, 7 Sep 2022 18:07:31 -0700 > > > Dan Williams wrote: > > > > > > > Andrew Morton wrote: > > > >

Re: [PATCH -next] memregion: Add arch_flush_memregion() interface

2022-09-08 Thread Dan Williams
Jonathan Cameron wrote: > On Wed, 7 Sep 2022 18:07:31 -0700 > Dan Williams wrote: > > > Andrew Morton wrote: > > > I really dislike the term "flush". Sometimes it means writeback, > > > sometimes it means invalidate. Perhaps at other times it m

Re: [PATCH -next] memregion: Add arch_flush_memregion() interface

2022-09-08 Thread Dan Williams
Borislav Petkov wrote: > On Wed, Sep 07, 2022 at 09:52:17AM -0700, Dan Williams wrote: > > To be clear nfit stuff and CXL does run in guests, but they do not > > support secure-erase in a guest. > > > > However, the QEMU CXL enabling is building the ability to do *

Re: [PATCH -next] memregion: Add arch_flush_memregion() interface

2022-09-07 Thread Dan Williams
Andrew Morton wrote: > I really dislike the term "flush". Sometimes it means writeback, > sometimes it means invalidate. Perhaps at other times it means > both. > > Can we please be very clear in comments and changelogs about exactly > what this "flush" does. With bonus points for being more

Re: [PATCH -next] memregion: Add arch_flush_memregion() interface

2022-09-07 Thread Dan Williams
Davidlohr Bueso wrote: > On Wed, 07 Sep 2022, Borislav Petkov wrote: > > >On Mon, Aug 29, 2022 at 02:29:18PM -0700, Davidlohr Bueso wrote: > >> diff --git a/arch/x86/mm/pat/set_memory.c b/arch/x86/mm/pat/set_memory.c > >> index 1abd5438f126..18463cb704fb 100644 > >> ---

Re: [PATCH -next] memregion: Add arch_flush_memregion() interface

2022-09-07 Thread Dan Williams
Davidlohr Bueso wrote: > Not sure the proper way to route this (akpm?). But unless any remaining > objections, could this be picked up? My plan was, barring objections, to take it through the CXL tree with its first user, the CXL security commands.

RE: [PATCH] nvdimm: Avoid wasting some memory.

2022-09-04 Thread Dan Williams
Christophe JAILLET wrote: > sizeof(struct btt_sb) is 4096. > > When using devm_kzalloc(), there is a small memory overhead and, on most > systems, this leads to 40 bytes of extra memory allocation. > So 5036 bytes are expected to be allocated. > > The memory allocator works with fixed size hunks

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

2022-08-29 Thread Dan Williams
at this level, > added the spa range for nfit even though this is unused. Looks reasonable to me. Reviewed-by: Dan Williams

RE: [PATCH v7] mm, pmem, xfs: Introduce MF_MEM_REMOVE for unbind

2022-08-26 Thread Dan Williams
Shiyang Ruan wrote: > This patch is inspired by Dan's "mm, dax, pmem: Introduce > dev_pagemap_failure()"[1]. With the help of dax_holder and > ->notify_failure() mechanism, the pmem driver is able to ask filesystem > (or mapped device) on it to unmap all files in use and notify processes > who

Re: [PATCH v7] x86/mce: retrieve poison range from hardware

2022-08-26 Thread Dan Williams
Borislav Petkov wrote: > On Thu, Aug 25, 2022 at 04:29:47PM +, Jane Chu wrote: > > Tony has replied. > > Do you really think that I can't look up what field means? > > What I said was > > "What I'm missing from this text here is... " > > IOW, what I'm trying to say is, you should formulate

Re: [PATCH v2 05/14] mm: Introduce mf_dax_kill_procs() for fsdax case

2022-08-25 Thread Dan Williams
Dan Williams wrote: > Dan Williams wrote: > > HORIGUCHI NAOYA(堀口 直也) wrote: > > > On Wed, Aug 24, 2022 at 02:52:51PM -0700, Dan Williams wrote: > > > > Shiyang Ruan wrote: > > > > > This new function is a variant of mf_generic_kill_procs that

Re: [PATCH v2 05/14] mm: Introduce mf_dax_kill_procs() for fsdax case

2022-08-24 Thread Dan Williams
Dan Williams wrote: > HORIGUCHI NAOYA(堀口 直也) wrote: > > On Wed, Aug 24, 2022 at 02:52:51PM -0700, Dan Williams wrote: > > > Shiyang Ruan wrote: > > > > This new function is a variant of mf_generic_kill_procs that accepts a > > > > file, offset pair ins

Re: [PATCH v2 05/14] mm: Introduce mf_dax_kill_procs() for fsdax case

2022-08-24 Thread Dan Williams
HORIGUCHI NAOYA(堀口 直也) wrote: > On Wed, Aug 24, 2022 at 02:52:51PM -0700, Dan Williams wrote: > > Shiyang Ruan wrote: > > > This new function is a variant of mf_generic_kill_procs that accepts a > > > file, offset pair instead of a struct to support multiple files

RE: [PATCH v2 05/14] mm: Introduce mf_dax_kill_procs() for fsdax case

2022-08-24 Thread Dan Williams
file system performed a reverse > mapping from the storage address to the file and file offset. > > Signed-off-by: Shiyang Ruan > Reviewed-by: Dan Williams > Reviewed-by: Christoph Hellwig > Reviewed-by: Darrick J. Wong > Reviewed-by: Miaohe Lin > --- > include/linux/m

Re: [PATCH v2] arch/cacheflush: Introduce flush_all_caches()

2022-08-23 Thread Dan Williams
Davidlohr Bueso wrote: > On Mon, 22 Aug 2022, Dan Williams wrote: > > >Davidlohr Bueso wrote: > >> On Sun, 21 Aug 2022, Christoph Hellwig wrote: > >> > >> >On Fri, Aug 19, 2022 at 10:10:24AM -0700, Davidlohr Bueso wrote: > >> >> index

Re: [PATCH v2] arch/cacheflush: Introduce flush_all_caches()

2022-08-22 Thread Dan Williams
Davidlohr Bueso wrote: > On Sun, 21 Aug 2022, Christoph Hellwig wrote: > > >On Fri, Aug 19, 2022 at 10:10:24AM -0700, Davidlohr Bueso wrote: > >> index b192d917a6d0..ac4d4fd4e508 100644 > >> --- a/arch/x86/include/asm/cacheflush.h > >> +++ b/arch/x86/include/asm/cacheflush.h > >> @@ -10,4 +10,8

Re: [PATCH] arch/cacheflush: Introduce flush_all_caches()

2022-08-16 Thread Dan Williams
Davidlohr Bueso wrote: > On Tue, 16 Aug 2022, Dan Williams wrote: > > >On Tue, Aug 16, 2022 at 10:30 AM Davidlohr Bueso wrote: > >> > >> On Tue, 16 Aug 2022, Dan Williams wrote: > >> > >> >Peter Zijlstra wrote: > >> >&g

Re: [PATCH] arch/cacheflush: Introduce flush_all_caches()

2022-08-16 Thread Dan Williams
On Tue, Aug 16, 2022 at 10:30 AM Davidlohr Bueso wrote: > > On Tue, 16 Aug 2022, Dan Williams wrote: > > >Peter Zijlstra wrote: > >> On Mon, Aug 15, 2022 at 09:07:06AM -0700, Davidlohr Bueso wrote: > >> > diff --git a/arch/x86/include/asm/cacheflush.h > &

Re: [PATCH] arch/cacheflush: Introduce flush_all_caches()

2022-08-16 Thread Dan Williams
Peter Zijlstra wrote: > On Mon, Aug 15, 2022 at 09:07:06AM -0700, Davidlohr Bueso wrote: > > diff --git a/arch/x86/include/asm/cacheflush.h > > b/arch/x86/include/asm/cacheflush.h > > index b192d917a6d0..ce2ec9556093 100644 > > --- a/arch/x86/include/asm/cacheflush.h > > +++

Re: [PATCH v7] x86/mce: retrieve poison range from hardware

2022-08-08 Thread Dan Williams
SB field is 0x1000 bytes, hence injecting > >> 2 back-to-back poisons and the driver ends up logging 8 badblocks, > >> because 0x1000 bytes is 8 512-byte. > >> > >> Dan Williams noticed that apei_mce_report_mem_error() hardcode > >> the LSB field to PAGE

RE: [PATCH v5 24/32] tools/testing/nvdimm: Convert to printbuf

2022-08-08 Thread Dan Williams
Matthew Wilcox (Oracle) wrote: > From: Kent Overstreet > > This converts from seq_buf to printbuf. Here we're using printbuf with > an external buffer, meaning it's a direct conversion. > > Signed-off-by: Kent Overstreet > Cc: Dan Williams > Cc: Dave Hansen > Cc:

Re: [PATCH v5] x86/mce: retrieve poison range from hardware

2022-08-01 Thread Dan Williams
Jane Chu wrote: > On 8/1/2022 9:44 AM, Dan Williams wrote: > > Jane Chu wrote: > >> With Commit 7917f9cdb503 ("acpi/nfit: rely on mce->misc to determine > >> poison granularity") that changed nfit_handle_mce() callback to report > >> badrange accord

RE: [PATCH v5] x86/mce: retrieve poison range from hardware

2022-08-01 Thread Dan Williams
misc LSB field is 0x1000 bytes, hence injecting > 2 back-to-back poisons and the driver ends up logging 8 badblocks, > because 0x1000 bytes is 8 512-byte. > > Dan Williams noticed that apei_mce_report_mem_error() hardcode > the LSB field to PAGE_SHIFT instead of consulting the input

  1   2   3   4   5   6   7   8   9   10   >