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

2024-04-30 Thread Vishal Verma
ed-by: Dan Williams Signed-off-by: Vishal Verma --- drivers/dax/bus.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/dax/bus.c b/drivers/dax/bus.c index 0011a6e6a8f2..f24b67c64d5e 100644 --- a/drivers/dax/bus.c +++ b/drivers/dax/bus.c @@ -937,11 +937,11 @@ stat

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

2024-04-30 Thread Vishal Verma
Signed-off-by: Vishal Verma --- drivers/dax/bus.c | 6 +- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/drivers/dax/bus.c b/drivers/dax/bus.c index e2c7354ce328..0011a6e6a8f2 100644 --- a/drivers/dax/bus.c +++ b/drivers/dax/bus.c @@ -1540,12 +1540,8 @@ static stru

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

2024-04-30 Thread Vishal Verma
] Fixes: c05ae9d85b47 ("dax/bus.c: replace driver-core lock usage by a local rwsem") Cc: Andrew Morton Reported-by: Dan Williams Reviewed-by: Dan Williams Signed-off-by: Vishal Verma --- drivers/dax/bus.c | 16 1 file changed, 8 insertions(+), 8 deletions(-) diff --git

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

2024-04-30 Thread Vishal Verma
ed. Fixes: c05ae9d85b47 ("dax/bus.c: replace driver-core lock usage by a local rwsem") Reported-by: Dan Williams Reviewed-by: Dan Williams Signed-off-by: Vishal Verma --- drivers/dax/bus.c | 42 -- 1 file changed, 8 insertions(+), 34 deletions(-)

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

2024-04-16 Thread Vishal Verma
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") Reported-by: Dan Williams Signed-off-by: Vishal Verma --

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

2024-04-16 Thread Vishal Verma
Signed-off-by: Vishal Verma --- drivers/dax/bus.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/dax/bus.c b/drivers/dax/bus.c index db183eb5ce3a..66095e60a279 100644 --- a/drivers/dax/bus.c +++ b/drivers/dax/bus.c @@ -939,11 +939,11 @@ static ssize_t size_show(struct d

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

2024-04-16 Thread Vishal Verma
ove commit introduced in unregister_dax_dev() and unregister_dax_mapping(). Fixes: 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 ++--

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

2024-04-16 Thread Vishal Verma
] 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 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/drivers/dax/bus.c b/d

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

2024-04-02 Thread Vishal Verma
lock usage by a local rwsem") Cc: Andrew Morton Reported-by: Dan Williams Signed-off-by: Vishal Verma --- drivers/dax/bus.c | 23 +-- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/drivers/dax/bus.c b/drivers/dax/bus.c index 797e1ebff299..d89c8c3b6

[PATCH v7 5/5] dax: add a sysfs knob to control memmap_on_memory behavior

2024-01-24 Thread Vishal Verma
Hildenbrand Reviewed-by: Huang, Ying Signed-off-by: Vishal Verma --- drivers/dax/bus.c | 43 + Documentation/ABI/testing/sysfs-bus-dax | 17 + 2 files changed, 60 insertions(+) diff --git a/drivers/dax/bus.c b/drivers/dax/bus.c index

[PATCH v7 2/5] dax/bus.c: replace several sprintf() with sysfs_emit()

2024-01-24 Thread Vishal Verma
-by: Vishal Verma --- drivers/dax/bus.c | 32 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/drivers/dax/bus.c b/drivers/dax/bus.c index cb148f74ceda..0fd948a4443e 100644 --- a/drivers/dax/bus.c +++ b/drivers/dax/bus.c @@ -269,7 +269,7 @@ static

[PATCH v7 4/5] mm/memory_hotplug: export mhp_supports_memmap_on_memory()

2024-01-24 Thread Vishal Verma
Salvador Cc: Dan Williams Cc: Dave Jiang Cc: Dave Hansen Cc: Huang Ying Suggested-by: David Hildenbrand Acked-by: David Hildenbrand Signed-off-by: Vishal Verma --- include/linux/memory_hotplug.h | 6 ++ mm/memory_hotplug.c| 17 ++--- 2 files changed, 12

[PATCH v7 3/5] Documentatiion/ABI: Add ABI documentation for sys-bus-dax

2024-01-24 Thread Vishal Verma
Add the missing sysfs ABI documentation for the device DAX subsystem. Various ABI attributes under this have been present since v5.1, and more have been added over time. In preparation for adding a new attribute, add this file with the historical details. Cc: Dan Williams Signed-off-by: Vishal

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

2024-01-24 Thread Vishal Verma
() 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 insertions(+), 63 deletions(-) diff --git a/drivers/dax/bus.c b/drivers/dax/bus.c index

[PATCH v7 0/5] Add DAX ABI for memmap_on_memory

2024-01-24 Thread Vishal Verma
Cc: Matthew Wilcox Cc: To: Dan Williams To: Vishal Verma To: Dave Jiang To: Andrew Morton To: Oscar Salvador --- Vishal Verma (5): dax/bus.c: replace driver-core lock usage by a local rwsem dax/bus.c: replace several sprintf() with sysfs_emit() Documentatiion/ABI: Add

[PATCH v6 3/4] mm/memory_hotplug: export mhp_supports_memmap_on_memory()

2023-12-14 Thread Vishal Verma
Salvador Cc: Dan Williams Cc: Dave Jiang Cc: Dave Hansen Cc: Huang Ying Suggested-by: David Hildenbrand Acked-by: David Hildenbrand Signed-off-by: Vishal Verma --- include/linux/memory_hotplug.h | 6 ++ mm/memory_hotplug.c| 17 ++--- 2 files changed, 12

[PATCH v6 4/4] dax: add a sysfs knob to control memmap_on_memory behavior

2023-12-14 Thread Vishal Verma
Hildenbrand Signed-off-by: Vishal Verma --- drivers/dax/bus.c | 36 + Documentation/ABI/testing/sysfs-bus-dax | 17 2 files changed, 53 insertions(+) diff --git a/drivers/dax/bus.c b/drivers/dax/bus.c index 6226de131d17

[PATCH v6 1/4] Documentatiion/ABI: Add ABI documentation for sys-bus-dax

2023-12-14 Thread Vishal Verma
Add the missing sysfs ABI documentation for the device DAX subsystem. Various ABI attributes under this have been present since v5.1, and more have been added over time. In preparation for adding a new attribute, add this file with the historical details. Cc: Dan Williams Signed-off-by: Vishal

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

2023-12-14 Thread Vishal Verma
Martins Cc: Dan Williams Signed-off-by: Vishal Verma --- drivers/dax/bus.c | 143 ++ 1 file changed, 59 insertions(+), 84 deletions(-) diff --git a/drivers/dax/bus.c b/drivers/dax/bus.c index 1ff1ab5fa105..6226de131d17 100644 --- a/drivers/dax

[PATCH v6 0/4] Add DAX ABI for memmap_on_memory

2023-12-14 Thread Vishal Verma
ges in v2: - Fix CC lists, patch 1/2 didn't get sent correctly in v1 - Link to v1: https://lore.kernel.org/r/20231206-vv-dax_abi-v1-0-474eb88e2...@intel.com Cc: Cc: Cc: Cc: David Hildenbrand Cc: Dave Hansen Cc: Huang Ying Cc: Greg Kroah-Hartman Cc: To: Dan Williams To: Vishal Verma To: D

[PATCH v5 3/4] mm/memory_hotplug: export mhp_supports_memmap_on_memory()

2023-12-13 Thread Vishal Verma
Salvador Cc: Dan Williams Cc: Dave Jiang Cc: Dave Hansen Cc: Huang Ying Suggested-by: David Hildenbrand Signed-off-by: Vishal Verma --- include/linux/memory_hotplug.h | 6 ++ mm/memory_hotplug.c| 17 ++--- 2 files changed, 12 insertions(+), 11 deletions(-) diff

[PATCH v5 4/4] dax: add a sysfs knob to control memmap_on_memory behavior

2023-12-13 Thread Vishal Verma
Hildenbrand Signed-off-by: Vishal Verma --- drivers/dax/bus.c | 38 + Documentation/ABI/testing/sysfs-bus-dax | 17 +++ 2 files changed, 55 insertions(+) diff --git a/drivers/dax/bus.c b/drivers/dax/bus.c index 6226de131d17

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

2023-12-13 Thread Vishal Verma
Martins Cc: Dan Williams Signed-off-by: Vishal Verma --- drivers/dax/bus.c | 143 ++ 1 file changed, 59 insertions(+), 84 deletions(-) diff --git a/drivers/dax/bus.c b/drivers/dax/bus.c index 1ff1ab5fa105..6226de131d17 100644 --- a/drivers/dax

[PATCH v5 1/4] Documentatiion/ABI: Add ABI documentation for sys-bus-dax

2023-12-13 Thread Vishal Verma
Add the missing sysfs ABI documentation for the device DAX subsystem. Various ABI attributes under this have been present since v5.1, and more have been added over time. In preparation for adding a new attribute, add this file with the historical details. Cc: Dan Williams Signed-off-by: Vishal

[PATCH v5 0/4] Add DAX ABI for memmap_on_memory

2023-12-13 Thread Vishal Verma
, patch 1/2 didn't get sent correctly in v1 - Link to v1: https://lore.kernel.org/r/20231206-vv-dax_abi-v1-0-474eb88e2...@intel.com Cc: Cc: Cc: Cc: David Hildenbrand Cc: Dave Hansen Cc: Huang Ying Cc: Greg Kroah-Hartman Cc: To: Dan Williams To: Vishal Verma To: Dave Jiang To: Andrew

[PATCH v4 3/3] dax: add a sysfs knob to control memmap_on_memory behavior

2023-12-12 Thread Vishal Verma
Hildenbrand Signed-off-by: Vishal Verma --- drivers/dax/bus.c | 32 Documentation/ABI/testing/sysfs-bus-dax | 17 + 2 files changed, 49 insertions(+) diff --git a/drivers/dax/bus.c b/drivers/dax/bus.c index ce1356ac6dc2

[PATCH v4 2/3] dax/bus: Introduce guard(device) for device_{lock,unlock} flows

2023-12-12 Thread Vishal Verma
Martins Suggested-by: Dan Williams Signed-off-by: Vishal Verma --- include/linux/device.h | 2 + drivers/dax/bus.c | 109 +++-- 2 files changed, 44 insertions(+), 67 deletions(-) diff --git a/include/linux/device.h b/include/linux/device.h index

[PATCH v4 1/3] Documentatiion/ABI: Add ABI documentation for sys-bus-dax

2023-12-12 Thread Vishal Verma
Add the missing sysfs ABI documentation for the device DAX subsystem. Various ABI attributes under this have been present since v5.1, and more have been added over time. In preparation for adding a new attribute, add this file with the historical details. Cc: Dan Williams Signed-off-by: Vishal

[PATCH v4 0/3] Add DAX ABI for memmap_on_memory

2023-12-12 Thread Vishal Verma
-474eb88e2...@intel.com --- Vishal Verma (3): Documentatiion/ABI: Add ABI documentation for sys-bus-dax dax/bus: Introduce guard(device) for device_{lock,unlock} flows dax: add a sysfs knob to control memmap_on_memory behavior include/linux/device.h | 2 + drivers/dax

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

2023-12-11 Thread Vishal Verma
Hildenbrand Signed-off-by: Vishal Verma --- drivers/dax/bus.c | 47 + Documentation/ABI/testing/sysfs-bus-dax | 17 2 files changed, 64 insertions(+) diff --git a/drivers/dax/bus.c b/drivers/dax/bus.c index 1ff1ab5fa105..2871e5188f0d

[PATCH v3 1/2] Documentatiion/ABI: Add ABI documentation for sys-bus-dax

2023-12-11 Thread Vishal Verma
Add the missing sysfs ABI documentation for the device DAX subsystem. Various ABI attributes under this have been present since v5.1, and more have been added over time. In preparation for adding a new attribute, add this file with the historical details. Cc: Dan Williams Signed-off-by: Vishal

[PATCH v3 0/2] Add DAX ABI for memmap_on_memory

2023-12-11 Thread Vishal Verma
to v1: https://lore.kernel.org/r/20231206-vv-dax_abi-v1-0-474eb88e2...@intel.com --- Vishal Verma (2): Documentatiion/ABI: Add ABI documentation for sys-bus-dax dax: add a sysfs knob to control memmap_on_memory behavior drivers/dax/bus.c | 47

[PATCH v2 1/2] Documentatiion/ABI: Add ABI documentation for sys-bus-dax

2023-12-06 Thread Vishal Verma
Add the missing sysfs ABI documentation for the device DAX subsystem. Various ABI attributes under this have been present since v5.1, and more have been added over time. In preparation for adding a new attribute, add this file with the historical details. Cc: Dan Williams Signed-off-by: Vishal

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

2023-12-06 Thread Vishal Verma
-by: Vishal Verma --- drivers/dax/bus.c | 40 + Documentation/ABI/testing/sysfs-bus-dax | 13 +++ 2 files changed, 53 insertions(+) diff --git a/drivers/dax/bus.c b/drivers/dax/bus.c index 1ff1ab5fa105..11abb57cc031 100644 --- a/drivers/dax

[PATCH v2 0/2] Add DAX ABI for memmap_on_memory

2023-12-06 Thread Vishal Verma
additions behind the initial documentation creation. [1]: https://lore.kernel.org/linux-cxl/651f27b728fef_ae7e729...@dwillia2-xfh.jf.intel.com.notmuch/ Cc: Dan Williams Cc: Cc: Cc: To: Dave Jiang Signed-off-by: Vishal Verma Changes in v2: - Fix CC lists, patch 1/2 didn't get sent

[PATCH v10 3/3] dax/kmem: allow kmem to add memory with memmap_on_memory

2023-11-06 Thread Vishal Verma
Huang, Ying" Signed-off-by: Vishal Verma --- drivers/dax/bus.h | 1 + drivers/dax/dax-private.h | 1 + drivers/dax/bus.c | 3 +++ drivers/dax/cxl.c | 1 + drivers/dax/hmem/hmem.c | 1 + drivers/dax/kmem.c| 8 +++- drivers/dax/pmem.c| 1 + 7 fil

[PATCH v10 2/3] mm/memory_hotplug: split memmap_on_memory requests across memblocks

2023-11-06 Thread Vishal Verma
Williams Cc: Dave Jiang Cc: Dave Hansen Cc: Huang Ying Suggested-by: David Hildenbrand Reviewed-by: Dan Williams Reviewed-by: "Huang, Ying" Acked-by: David Hildenbrand Signed-off-by: Vishal Verma --- mm/memory_hotplug.c | 212 +-

[PATCH v10 1/3] mm/memory_hotplug: replace an open-coded kmemdup() in add_memory_resource()

2023-11-06 Thread Vishal Verma
Hildenbrand Reviewed-by: Fan Ni Signed-off-by: Vishal Verma --- mm/memory_hotplug.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/mm/memory_hotplug.c b/mm/memory_hotplug.c index ab41a511e20a..3ed48059a780 100644 --- a/mm/memory_hotplug.c +++ b/mm/memory_hotplug.c

[PATCH v10 0/3] mm: use memmap_on_memory semantics for dax/kmem

2023-11-06 Thread Vishal Verma
. Patch 3 allows the dax region drivers to request memmap_on_memory semantics. CXL dax regions default this to 'on', all others default to off to keep existing behavior unchanged. Signed-off-by: Vishal Verma --- Changes in v10: - Rebase on current mainline (Andrew Morton) - Pick up Reviewed-by (Fan

[PATCH v9 3/3] dax/kmem: allow kmem to add memory with memmap_on_memory

2023-11-02 Thread Vishal Verma
Ying Signed-off-by: Vishal Verma --- drivers/dax/bus.h | 1 + drivers/dax/dax-private.h | 1 + drivers/dax/bus.c | 3 +++ drivers/dax/cxl.c | 1 + drivers/dax/hmem/hmem.c | 1 + drivers/dax/kmem.c| 8 +++- drivers/dax/pmem.c| 1 + 7 files changed, 15

[PATCH v9 2/3] mm/memory_hotplug: split memmap_on_memory requests across memblocks

2023-11-02 Thread Vishal Verma
Williams Cc: Dave Jiang Cc: Dave Hansen Cc: Huang Ying Suggested-by: David Hildenbrand Reviewed-by: Dan Williams Acked-by: David Hildenbrand Signed-off-by: Vishal Verma --- mm/memory_hotplug.c | 210 ++-- 1 file changed, 136 insertions(+), 74

[PATCH v9 1/3] mm/memory_hotplug: replace an open-coded kmemdup() in add_memory_resource()

2023-11-02 Thread Vishal Verma
Hildenbrand Signed-off-by: Vishal Verma --- mm/memory_hotplug.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/mm/memory_hotplug.c b/mm/memory_hotplug.c index f8d3e7427e32..6be7de9efa55 100644 --- a/mm/memory_hotplug.c +++ b/mm/memory_hotplug.c @@ -1439,11 +1439,11 @@ int

[PATCH v9 0/3] mm: use memmap_on_memory semantics for dax/kmem

2023-11-02 Thread Vishal Verma
. Patch 3 allows the dax region drivers to request memmap_on_memory semantics. CXL dax regions default this to 'on', all others default to off to keep existing behavior unchanged. Signed-off-by: Vishal Verma --- Changes in v9: - Fix error unwinding for the ENOMEM case

[PATCH v8 0/3] mm: use memmap_on_memory semantics for dax/kmem

2023-11-01 Thread Vishal Verma
. Patch 3 allows the dax region drivers to request memmap_on_memory semantics. CXL dax regions default this to 'on', all others default to off to keep existing behavior unchanged. Signed-off-by: Vishal Verma --- Changes in v8: - Fix unwinding in create_altmaps_and_memory_blocks() to remove

[PATCH v8 2/3] mm/memory_hotplug: split memmap_on_memory requests across memblocks

2023-11-01 Thread Vishal Verma
Williams Cc: Dave Jiang Cc: Dave Hansen Cc: Huang Ying Suggested-by: David Hildenbrand Reviewed-by: Dan Williams Signed-off-by: Vishal Verma --- mm/memory_hotplug.c | 213 ++-- 1 file changed, 138 insertions(+), 75 deletions(-) diff --git a/mm

[PATCH v8 3/3] dax/kmem: allow kmem to add memory with memmap_on_memory

2023-11-01 Thread Vishal Verma
, Ying Signed-off-by: Vishal Verma --- drivers/dax/bus.h | 1 + drivers/dax/dax-private.h | 1 + drivers/dax/bus.c | 3 +++ drivers/dax/cxl.c | 1 + drivers/dax/hmem/hmem.c | 1 + drivers/dax/kmem.c| 8 +++- drivers/dax/pmem.c| 1 + 7 files changed, 15

[PATCH v8 1/3] mm/memory_hotplug: replace an open-coded kmemdup() in add_memory_resource()

2023-11-01 Thread Vishal Verma
Hildenbrand Signed-off-by: Vishal Verma --- mm/memory_hotplug.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/mm/memory_hotplug.c b/mm/memory_hotplug.c index f8d3e7427e32..6be7de9efa55 100644 --- a/mm/memory_hotplug.c +++ b/mm/memory_hotplug.c @@ -1439,11 +1439,11 @@ int

[PATCH v7 2/3] mm/memory_hotplug: split memmap_on_memory requests across memblocks

2023-10-25 Thread Vishal Verma
Williams Cc: Dave Jiang Cc: Dave Hansen Cc: Huang Ying Suggested-by: David Hildenbrand Reviewed-by: Dan Williams Signed-off-by: Vishal Verma --- mm/memory_hotplug.c | 209 1 file changed, 144 insertions(+), 65 deletions(-) diff --git a/mm

[PATCH v7 3/3] dax/kmem: allow kmem to add memory with memmap_on_memory

2023-10-25 Thread Vishal Verma
-by: Vishal Verma --- drivers/dax/bus.h | 1 + drivers/dax/dax-private.h | 1 + drivers/dax/bus.c | 3 +++ drivers/dax/cxl.c | 1 + drivers/dax/hmem/hmem.c | 1 + drivers/dax/kmem.c| 8 +++- drivers/dax/pmem.c| 1 + 7 files changed, 15 insertions(+), 1 deletion

[PATCH v7 1/3] mm/memory_hotplug: replace an open-coded kmemdup() in add_memory_resource()

2023-10-25 Thread Vishal Verma
Hildenbrand Signed-off-by: Vishal Verma --- mm/memory_hotplug.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/mm/memory_hotplug.c b/mm/memory_hotplug.c index f8d3e7427e32..6be7de9efa55 100644 --- a/mm/memory_hotplug.c +++ b/mm/memory_hotplug.c @@ -1439,11 +1439,11 @@ int

[PATCH v7 0/3] mm: use memmap_on_memory semantics for dax/kmem

2023-10-25 Thread Vishal Verma
. Patch 3 allows the dax region drivers to request memmap_on_memory semantics. CXL dax regions default this to 'on', all others default to off to keep existing behavior unchanged. Signed-off-by: Vishal Verma --- Changes in v7: - Make the add_memory_resource() flow symmetrical w.r.t. try_remove_memory

[PATCH v6 3/3] dax/kmem: allow kmem to add memory with memmap_on_memory

2023-10-16 Thread Vishal Verma
-by: Vishal Verma --- drivers/dax/bus.h | 1 + drivers/dax/dax-private.h | 1 + drivers/dax/bus.c | 3 +++ drivers/dax/cxl.c | 1 + drivers/dax/hmem/hmem.c | 1 + drivers/dax/kmem.c| 8 +++- drivers/dax/pmem.c| 1 + 7 files changed, 15 insertions(+), 1 deletion

[PATCH v6 1/3] mm/memory_hotplug: replace an open-coded kmemdup() in add_memory_resource()

2023-10-16 Thread Vishal Verma
A review of the memmap_on_memory modifications to add_memory_resource() revealed an instance of an open-coded kmemdup(). Replace it with kmemdup(). Cc: Andrew Morton Cc: David Hildenbrand Cc: Michal Hocko Cc: Oscar Salvador Cc: Dan Williams Reported-by: Dan Williams Signed-off-by: Vishal

[PATCH v6 2/3] mm/memory_hotplug: split memmap_on_memory requests across memblocks

2023-10-16 Thread Vishal Verma
Williams Cc: Dave Jiang Cc: Dave Hansen Cc: Huang Ying Suggested-by: David Hildenbrand Reviewed-by: Dan Williams Signed-off-by: Vishal Verma --- mm/memory_hotplug.c | 214 1 file changed, 148 insertions(+), 66 deletions(-) diff --git a/mm

[PATCH v6 0/3] mm: use memmap_on_memory semantics for dax/kmem

2023-10-16 Thread Vishal Verma
driver that would allow an opt-out of using memmap_on_memory for the memory being added. Signed-off-by: Vishal Verma --- Changes in v6: - Add a prep patch to replace an open coded kmemdup in add_memory_resource() (Dan Williams) - Fix ordering of firmware_map_remove w.r.t taking the hotplug lock

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

2023-10-05 Thread Vishal Verma
: David Hildenbrand Cc: Michal Hocko Cc: Oscar Salvador Cc: Dan Williams Cc: Dave Jiang Cc: Dave Hansen Cc: Huang Ying Suggested-by: David Hildenbrand Signed-off-by: Vishal Verma --- mm/memory_hotplug.c | 162 1 file changed, 99 insertions

[PATCH v5 0/2] mm: use memmap_on_memory semantics for dax/kmem

2023-10-05 Thread Vishal Verma
driver that would allow an opt-out of using memmap_on_memory for the memory being added. Signed-off-by: Vishal Verma --- Changes in v5: - Separate out per-memblock operations from per memory block operations in try_remove_memory(), and rename the inner function appropriately. This does expand

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

2023-10-05 Thread Vishal Verma
Cc: Huang Ying Reviewed-by: Jonathan Cameron Reviewed-by: David Hildenbrand Signed-off-by: Vishal Verma --- drivers/dax/bus.h | 1 + drivers/dax/dax-private.h | 1 + drivers/dax/bus.c | 38 ++ drivers/dax/cxl.c | 1 + drivers/dax

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

2023-09-28 Thread Vishal Verma
Cc: Huang Ying Reviewed-by: Jonathan Cameron Signed-off-by: Vishal Verma --- drivers/dax/bus.h | 1 + drivers/dax/dax-private.h | 1 + drivers/dax/bus.c | 38 ++ drivers/dax/cxl.c | 1 + drivers/dax/hmem/hmem.c | 1 + drivers/dax

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

2023-09-28 Thread Vishal Verma
: David Hildenbrand Cc: Michal Hocko Cc: Oscar Salvador Cc: Dan Williams Cc: Dave Jiang Cc: Dave Hansen Cc: Huang Ying Suggested-by: David Hildenbrand Signed-off-by: Vishal Verma --- mm/memory_hotplug.c | 165 +++- 1 file changed, 100 insertions

[PATCH v4 0/2] mm: use memmap_on_memory semantics for dax/kmem

2023-09-28 Thread Vishal Verma
driver that would allow an opt-out of using memmap_on_memory for the memory being added. Signed-off-by: Vishal Verma --- Changes in v4: - Rebase to Aneesh's PPC64 memmap_on_memory series v8 [2]. - Tweak a goto / error path in add_memory_create_devices() (Jonathan) - Retain the old behavior for dax

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

2023-08-01 Thread Vishal Verma
of this behavior. Cc: Andrew Morton Cc: David Hildenbrand Cc: Michal Hocko Cc: Oscar Salvador Cc: Dan Williams Cc: Dave Jiang Cc: Dave Hansen Cc: Huang Ying Signed-off-by: Vishal Verma --- drivers/dax/dax-private.h | 1 + drivers/dax/bus.c | 42

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

2023-08-01 Thread Vishal Verma
: David Hildenbrand Cc: Michal Hocko Cc: Oscar Salvador Cc: Dan Williams Cc: Dave Jiang Cc: Dave Hansen Cc: Huang Ying Suggested-by: David Hildenbrand Signed-off-by: Vishal Verma --- mm/memory_hotplug.c | 150 1 file changed, 93 insertions

[PATCH v3 0/2] mm: use memmap_on_memory semantics for dax/kmem

2023-08-01 Thread Vishal Verma
driver that would allow an opt-out of using memmap_on_memory for the memory being added. Signed-off-by: Vishal Verma --- Changes in v3: - Rebase on Aneesh's patches [1] - Drop Patch 1 - it is not needed since [1] allows for dynamic setting of the memmap_on_memory param (David) - Link to v2

[PATCH v2 3/3] dax/kmem: allow kmem to add memory with memmap_on_memory

2023-07-20 Thread Vishal Verma
the dax device to opt out of this behavior. Cc: Andrew Morton Cc: David Hildenbrand Cc: Oscar Salvador Cc: Dan Williams Cc: Dave Jiang Cc: Dave Hansen Cc: Huang Ying Signed-off-by: Vishal Verma --- drivers/dax/dax-private.h | 1 + drivers/dax/bus.c | 48

[PATCH v2 2/3] mm/memory_hotplug: split memmap_on_memory requests across memblocks

2023-07-20 Thread Vishal Verma
Morton Cc: David Hildenbrand Cc: Oscar Salvador Cc: Dan Williams Cc: Dave Jiang Cc: Dave Hansen Cc: Huang Ying Suggested-by: David Hildenbrand Signed-off-by: Vishal Verma --- mm/memory_hotplug.c | 154 +++- 1 file changed, 91 insertions(+), 63

[PATCH v2 1/3] mm/memory_hotplug: Export symbol mhp_supports_memmap_on_memory()

2023-07-20 Thread Vishal Verma
: Dave Hansen Cc: Huang Ying Reviewed-by: David Hildenbrand Signed-off-by: Vishal Verma --- include/linux/memory_hotplug.h | 5 + mm/memory_hotplug.c| 1 + 2 files changed, 6 insertions(+) diff --git a/include/linux/memory_hotplug.h b/include/linux/memory_hotplug.h index

[PATCH v2 0/3] mm: use memmap_on_memory semantics for dax/kmem

2023-07-20 Thread Vishal Verma
() and remove_memory() requests over memblock sized chunks. Patch 3 adds a sysfs control for the kmem driver that would allow an opt-out of using memmap_on_memory for the memory being added. Signed-off-by: Vishal Verma --- Changes in v2: - Drop the patch to create an override path for the memmap_on_memory module

[PATCH 3/3] dax/kmem: Always enroll hotplugged memory for memmap_on_memory

2023-06-15 Thread Vishal Verma
module parameter setting. Cc: "Rafael J. Wysocki" Cc: Len Brown Cc: Andrew Morton Cc: David Hildenbrand Cc: Oscar Salvador Cc: Dan Williams Cc: Dave Jiang Cc: Dave Hansen Cc: Huang Ying Signed-off-by: Vishal Verma --- drivers/dax/k

[PATCH 2/3] mm/memory_hotplug: Export symbol mhp_supports_memmap_on_memory()

2023-06-15 Thread Vishal Verma
Cc: Huang Ying Signed-off-by: Vishal Verma --- mm/memory_hotplug.c | 1 + 1 file changed, 1 insertion(+) diff --git a/mm/memory_hotplug.c b/mm/memory_hotplug.c index bb3845830922..92922080d3fa 100644 --- a/mm/memory_hotplug.c +++ b/mm/memory_hotplug.c @@ -1328,6 +1328,7 @@ bool mhp_supports_memmap

[PATCH 1/3] mm/memory_hotplug: Allow an override for the memmap_on_memory param

2023-06-15 Thread Vishal Verma
Huang Ying Signed-off-by: Vishal Verma --- include/linux/memory_hotplug.h | 2 +- drivers/acpi/acpi_memhotplug.c | 2 +- mm/memory_hotplug.c| 24 3 files changed, 18 insertions(+), 10 deletions(-) diff --git a/include/linux/memory_hotplug.h b/include/linux/memory

[PATCH 0/3] mm: use memmap_on_memory semantics for dax/kmem

2023-06-15 Thread Vishal Verma
/acpi_memoryhotplug.c, exporting the symbol so it can be called by kmem.c, and finally changing the kmem driver to add_memory() in chunks of memory_block_size_bytes(). Signed-off-by: Vishal Verma --- Vishal Verma (3): mm/memory_hotplug: Allow an override for the memmap_on_memory param mm

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

2023-01-25 Thread Vishal Verma
pending work doesn't 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. Reported-

[PATCH v2 2/2] ACPI: HMAT: Fix initiator registration for single-initiator systems

2022-11-16 Thread Vishal Verma
() comparision callback. This prevents the singular list corner case naturally, and makes the code easier to follow as well. Cc: Cc: Rafael J. Wysocki Cc: Liu Shixin Cc: Dan Williams Cc: Kirill A. Shutemov Reported-by: Chris Piper Signed-off-by: Vishal Verma --- drivers/acpi/numa/hmat.c

[PATCH v2 1/2] ACPI: HMAT: remove unnecessary variable initialization

2022-11-16 Thread Vishal Verma
-by: Rafael J. Wysocki Signed-off-by: Vishal Verma --- drivers/acpi/numa/hmat.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/acpi/numa/hmat.c b/drivers/acpi/numa/hmat.c index 23f49a2f4d14..144a84f429ed 100644 --- a/drivers/acpi/numa/hmat.c +++ b/drivers/acpi/numa/hmat.c @@ -644,7

[PATCH v2 0/2] ACPI: HMAT: fix single-initiator target registrations

2022-11-16 Thread Vishal Verma
Cc: Liu Shixin Cc: Dan Williams Cc: linux-a...@vger.kernel.org Cc: linux-kernel@vger.kernel.org Cc: Cc: Chris Piper Cc: Kirill A. Shutemov Signed-off-by: Vishal Verma --- Changes in v2: - Collect Acks for patch 1. - Separate out the bitmask generation from the comparision helper to make

[PATCH 0/2] ACPI: HMAT: fix single-initiator target registrations

2022-11-15 Thread Vishal Verma
Patch 1 is an obvious cleanup found while fixing this problem. Patch 2 Fixes a bug with initiator registration for single-initiator systems. More details on this in its commit message. Vishal Verma (2): ACPI: HMAT: remove unnecessary variable initialization ACPI: HMAT: Fix initiator

[PATCH 2/2] ACPI: HMAT: Fix initiator registration for single-initiator systems

2022-11-15 Thread Vishal Verma
for that explicitly. Reported-by: Chris Piper Cc: Cc: Rafael J. Wysocki Cc: Liu Shixin Cc: Dan Williams Signed-off-by: Vishal Verma --- drivers/acpi/numa/hmat.c | 32 ++-- 1 file changed, 30 insertions(+), 2 deletions(-) diff --git a/drivers/acpi/numa/hmat.c b/drivers/acpi/numa

[PATCH 1/2] ACPI: HMAT: remove unnecessary variable initialization

2022-11-15 Thread Vishal Verma
In hmat_register_target_initiators(), the variable 'best' gets initialized in the outer per-locality-type for loop. The initialization just before setting up 'Access 1' targets was unnecessary. Remove it. Cc: Rafael J. Wysocki Cc: Liu Shixin Cc: Dan Williams Signed-off-by: Vishal Verma

Re: [PATCH v3 10/11] PM, libnvdimm: Add runtime firmware activation support

2020-07-28 Thread Vishal Verma
properly > > supports hibernate-freeze. > > > > The libnvdimm sysfs interface is extended to support detection of a > > firmware activate capability. The mechanism supports enumeration and > > triggering of firmware activate, optionally in the > > hibernate_quiet_exec() conte

Re: [PATCH v3 10/11] PM, libnvdimm: Add runtime firmware activation support

2020-07-20 Thread Vishal Verma
triggering of firmware activate, optionally in the > > hibernate_quiet_exec() context. > > > > Cc: Pavel Machek > > Cc: Ira Weiny > > Cc: Len Brown > > Cc: Jonathan Corbet > > Cc: Dave Jiang > > Cc: Vishal Verma > > [rafael: hibernate_q

Re: [Ksummit-discuss] [PATCH v2 3/3] libnvdimm, MAINTAINERS: Maintainer Entry Profile

2019-09-11 Thread Vishal Verma
> Document the basic policies of the libnvdimm subsystem and provide a first > example of a Maintainer Entry Profile for others to duplicate and edit. > > Cc: Vishal Verma > Cc: Dave Jiang > Signed-off-by: Dan Williams > --- > Documentation/nvdimm/maintainer-

[PATCH] device-dax: Add a 'resource' attribute

2019-06-20 Thread Vishal Verma
-by: Vishal Verma --- drivers/dax/bus.c | 19 +++ 1 file changed, 19 insertions(+) diff --git a/drivers/dax/bus.c b/drivers/dax/bus.c index 2109cfe80219..2f3c42ca416a 100644 --- a/drivers/dax/bus.c +++ b/drivers/dax/bus.c @@ -295,6 +295,22 @@ static ssize_t target_node_show(struct device

[tip:x86/urgent] acpi/nfit, x86/mce: Validate a MCE's address before using it

2018-11-06 Thread tip-bot for Vishal Verma
Commit-ID: e8a308e5f47e545e0d41d0686c00f5f5217c5f61 Gitweb: https://git.kernel.org/tip/e8a308e5f47e545e0d41d0686c00f5f5217c5f61 Author: Vishal Verma AuthorDate: Thu, 25 Oct 2018 18:37:29 -0600 Committer: Borislav Petkov CommitDate: Tue, 6 Nov 2018 19:13:26 +0100 acpi/nfit, x86/mce

[tip:x86/urgent] acpi/nfit, x86/mce: Validate a MCE's address before using it

2018-11-06 Thread tip-bot for Vishal Verma
Commit-ID: e8a308e5f47e545e0d41d0686c00f5f5217c5f61 Gitweb: https://git.kernel.org/tip/e8a308e5f47e545e0d41d0686c00f5f5217c5f61 Author: Vishal Verma AuthorDate: Thu, 25 Oct 2018 18:37:29 -0600 Committer: Borislav Petkov CommitDate: Tue, 6 Nov 2018 19:13:26 +0100 acpi/nfit, x86/mce

[tip:x86/urgent] acpi/nfit, x86/mce: Handle only uncorrectable machine checks

2018-11-06 Thread tip-bot for Vishal Verma
Commit-ID: 5d96c9342c23ee1d084802dcf064caa67ecaa45b Gitweb: https://git.kernel.org/tip/5d96c9342c23ee1d084802dcf064caa67ecaa45b Author: Vishal Verma AuthorDate: Thu, 25 Oct 2018 18:37:28 -0600 Committer: Borislav Petkov CommitDate: Tue, 6 Nov 2018 19:13:10 +0100 acpi/nfit, x86/mce

[tip:x86/urgent] acpi/nfit, x86/mce: Handle only uncorrectable machine checks

2018-11-06 Thread tip-bot for Vishal Verma
Commit-ID: 5d96c9342c23ee1d084802dcf064caa67ecaa45b Gitweb: https://git.kernel.org/tip/5d96c9342c23ee1d084802dcf064caa67ecaa45b Author: Vishal Verma AuthorDate: Thu, 25 Oct 2018 18:37:28 -0600 Committer: Borislav Petkov CommitDate: Tue, 6 Nov 2018 19:13:10 +0100 acpi/nfit, x86/mce

Re: [PATCH] MAINTAINERS: Adding backup maintainers for libnvdimm and DAX

2018-04-13 Thread Vishal Verma
h me: > > Acked-by: Ross Zwisler <ross.zwis...@linux.intel.com> Fine by me as well Acked-by: Vishal Verma <vishal.l.ve...@intel.com> > ___ > Linux-nvdimm mailing list > linux-nvd...@lists.01.org > https://lists.01.org/mailman/listinfo/linux-nvdimm

Re: [PATCH] MAINTAINERS: Adding backup maintainers for libnvdimm and DAX

2018-04-13 Thread Vishal Verma
Ross Zwisler Fine by me as well Acked-by: Vishal Verma > ___ > Linux-nvdimm mailing list > linux-nvd...@lists.01.org > https://lists.01.org/mailman/listinfo/linux-nvdimm

Re: [PATCH] libnvdimm, btt: check memory allocation failure

2017-08-29 Thread Vishal Verma
tes for UEFI 2.7 format") > Signed-off-by: Christophe JAILLET <christophe.jail...@wanadoo.fr> > --- > drivers/nvdimm/btt.c | 2 ++ > 1 file changed, 2 insertions(+) Looks good, thank you. Reviewed-by: Vishal Verma <vishal.l.ve...@intel.com> > > diff --git a/driver

Re: [PATCH] libnvdimm, btt: check memory allocation failure

2017-08-29 Thread Vishal Verma
tes for UEFI 2.7 format") > Signed-off-by: Christophe JAILLET > --- > drivers/nvdimm/btt.c | 2 ++ > 1 file changed, 2 insertions(+) Looks good, thank you. Reviewed-by: Vishal Verma > > diff --git a/drivers/nvdimm/btt.c b/drivers/nvdimm/btt.c > index 60491641a8d6..607184e

Re: [PATCH] libnvdimm: fix badblock range handling of ARS range

2017-07-10 Thread Vishal Verma
add_badblock_range() to set 'num_sectors' properly. > > Fixes: 0caeef63e6d2f866d85bb507bf63e0ce8ec91cef > Signed-off-by: Toshi Kani <toshi.k...@hpe.com> > Cc: Dan Williams <dan.j.willi...@intel.com> > Cc: Vishal Verma <vishal.l.ve...@intel.com> > Cc: <sta.

Re: [PATCH] libnvdimm: fix badblock range handling of ARS range

2017-07-10 Thread Vishal Verma
add_badblock_range() to set 'num_sectors' properly. > > Fixes: 0caeef63e6d2f866d85bb507bf63e0ce8ec91cef > Signed-off-by: Toshi Kani > Cc: Dan Williams > Cc: Vishal Verma > Cc: > --- > drivers/nvdimm/core.c |7 --- > 1 file changed, 4 insertions(+), 3 deleti

[PATCH] libnvdimm, btt: fix btt_rw_page not returning errors

2017-06-29 Thread Vishal Verma
Cc: <sta...@vger.kernel.org> Cc: Toshi Kani <toshi.k...@hpe.com> Cc: Dan Williams <dan.j.willi...@intel.com> Cc: Jeff Moyer <jmo...@redhat.com> Signed-off-by: Vishal Verma <vishal.l.ve...@intel.com> --- drivers/nvdimm/btt.c | 9 ++--- 1 file changed, 6 insertions(

[PATCH] libnvdimm, btt: fix btt_rw_page not returning errors

2017-06-29 Thread Vishal Verma
Cc: Cc: Toshi Kani Cc: Dan Williams Cc: Jeff Moyer Signed-off-by: Vishal Verma --- drivers/nvdimm/btt.c | 9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/drivers/nvdimm/btt.c b/drivers/nvdimm/btt.c index 7ca11df..4e56e72 100644 --- a/drivers/nvdimm/btt.c +++ b/drivers

[tip:ras/urgent] acpi, nfit: Fix the memory error check in nfit_handle_mce()

2017-05-21 Thread tip-bot for Vishal Verma
Commit-ID: fc08a4703a418a398bbb575ac311d36d110ac786 Gitweb: http://git.kernel.org/tip/fc08a4703a418a398bbb575ac311d36d110ac786 Author: Vishal Verma <vishal.l.ve...@intel.com> AuthorDate: Fri, 19 May 2017 11:39:10 +0200 Committer: Thomas Gleixner <t...@linutronix.de> CommitD

[tip:ras/urgent] acpi, nfit: Fix the memory error check in nfit_handle_mce()

2017-05-21 Thread tip-bot for Vishal Verma
Commit-ID: fc08a4703a418a398bbb575ac311d36d110ac786 Gitweb: http://git.kernel.org/tip/fc08a4703a418a398bbb575ac311d36d110ac786 Author: Vishal Verma AuthorDate: Fri, 19 May 2017 11:39:10 +0200 Committer: Thomas Gleixner CommitDate: Sun, 21 May 2017 21:39:59 +0200 acpi, nfit: Fix

Re: [PATCH] libnvdimm: fix phys_addr for nvdimm_clear_poison

2017-04-25 Thread Vishal Verma
On 04/25, Kani, Toshimitsu wrote: > On Tue, 2017-04-25 at 15:44 -0600, Vishal Verma wrote: > > On 04/25, Toshi Kani wrote: [...] > > > > Should we be using nsio->res.start here or nsio->addr ? > > nsio->addr is a virtual address. We need to pass the phys

Re: [PATCH] libnvdimm: fix phys_addr for nvdimm_clear_poison

2017-04-25 Thread Vishal Verma
On 04/25, Kani, Toshimitsu wrote: > On Tue, 2017-04-25 at 15:44 -0600, Vishal Verma wrote: > > On 04/25, Toshi Kani wrote: [...] > > > > Should we be using nsio->res.start here or nsio->addr ? > > nsio->addr is a virtual address. We need to pass the phys

Re: [PATCH] libnvdimm: fix phys_addr for nvdimm_clear_poison

2017-04-25 Thread Vishal Verma
li...@intel.com> > Cc: Dave Jiang <dave.ji...@intel.com> > Cc: Vishal Verma <vishal.l.ve...@intel.com> > --- > drivers/nvdimm/claim.c |3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/drivers/nvdimm/claim.c b/drivers/nvdimm/claim.c

  1   2   3   >