Re: [PATCH] NVMe: replace kmalloc and memset with kzalloc.

2013-07-12 Thread Verma, Vishal L
Hi Alexandru, This patch has already been applied: http://git.infradead.org/users/willy/linux-nvme.git/commitdiff/03ea83e9a37e 41d436f8348e6eee3d8281bfff3a It was submitted on the LKML on 6/9 by Tushar Behera. Thanks, -Vishal On 7/12/13 9:16 AM, "Alexandru Juncu" wrote: >Found using coccinel

Re: [PATCH 1/2] NVMe: Cocci spatch "kzalloc-simple"

2013-09-19 Thread Verma, Vishal L
On 9/19/13 4:25 PM, "Verma, Vishal L" wrote: >On 9/19/13 3:45 PM, "Thomas Meyer" wrote: > >>Use kzalloc rather than kmalloc followed by memset with 0. >>Found by coccinelle spatch "api/alloc/kzalloc-simple.cocci" >> >>Signed-off

Re: [PATCH 1/2] NVMe: Cocci spatch "kzalloc-simple"

2013-09-19 Thread Verma, Vishal L
On 9/19/13 3:45 PM, "Thomas Meyer" wrote: >Use kzalloc rather than kmalloc followed by memset with 0. >Found by coccinelle spatch "api/alloc/kzalloc-simple.cocci" > >Signed-off-by: Thomas Meyer >--- Thomas, This has already been applied to Matthew's tree: http://git.infradead.org/users/willy/l

Re: [PATCH] libnvdimm, bus: check id immediately following ida_simple_get

2018-08-03 Thread Verma, Vishal L
On Fri, 2018-08-03 at 08:08 -0400, Ocean He wrote: > From: Ocean He > > The id check was not executed immediately following ida_simple_get. > Just > change the codes position, without function change. > > Signed-off-by: Ocean He > --- > drivers/nvdimm/bus.c | 4 ++-- > 1 file changed, 2 inser

Re: [PATCH 1/2] tools/testing/nvdimm: Align test resources to 128M

2018-12-03 Thread Verma, Vishal L
On Sat, 2018-11-24 at 10:46 -0800, Dan Williams wrote: > In preparation for libnvdimm growing new restrictions to detect section > conflicts between persistent memory regions, enable nfit_test to > allocate aligned resources. Use a gen_pool to allocate nfit_test's fake > resources in a separate ad

Re: [PATCH] dax: remove SLAB_MEM_SPREAD flag usage

2024-02-27 Thread Verma, Vishal L
On Wed, 2024-02-28 at 11:16 +0800, Chengming Zhou wrote: > On 2024/2/28 00:29, Dave Jiang wrote: > > > > > > On 2/24/24 6:47 AM, chengming.z...@linux.dev wrote: > > > From: Chengming Zhou > > > > > > The SLAB_MEM_SPREAD flag is already a no-op as of 6.8-rc1, remove > > > its usage so we can del

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

2024-03-12 Thread Verma, Vishal L
On Tue, 2024-03-12 at 13:07 -0700, Dan Williams wrote: > Vishal Verma wrote: > > The dax driver incorrectly used driver-core device locks to protect > > internal dax region and dax device configuration structures. Replace the > > device lock usage with a local rwsem, one each for dax region > > con

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

2024-04-04 Thread Verma, Vishal L
On Thu, 2024-04-04 at 14:23 -0700, Andrew Morton wrote: > On Tue, 02 Apr 2024 00:24:28 -0600 Vishal Verma > wrote: > > > In [1], Dan points out that all of the WARN_ON_ONCE() usage in the > > referenced patch should be replaced with lockdep_assert_held(_write)(). > > > > Replace those, and addi

Re: [PATCH][next] dax: remove redundant assignment to variable rc

2024-04-16 Thread Verma, Vishal L
On Mon, 2024-04-15 at 11:19 +0100, Colin Ian King wrote: > The variable rc is being assigned an value and then is being re-assigned > a new value in the next statement. The assignment is redundant and can > be removed. > > Cleans up clang scan build warning: > drivers/dax/bus.c:1207:2: warning: Va

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

2024-04-29 Thread Verma, Vishal L
On Mon, 2024-04-29 at 18:25 -0700, Dan Williams wrote: > Vishal Verma wrote: > > Commit c05ae9d85b47 ("dax/bus.c: replace driver-core lock usage by a local > > rwsem") > > was a bit overzealous in eliminating device_lock() usage, and ended up > > removing a couple of lock acquisitions which were n

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

2023-10-03 Thread Verma, Vishal L
On Mon, 2023-10-02 at 11:28 +0200, David Hildenbrand wrote: > > > + > > +static int __ref try_remove_memory(u64 start, u64 size) > > +{ > > +   int rc, nid = NUMA_NO_NODE; > > + > > +   BUG_ON(check_hotplug_memory_range(start, size)); > > + > > +   /* > > +    * All memory blocks m

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

2023-10-03 Thread Verma, Vishal L
On Tue, 2023-10-03 at 09:34 +0530, Aneesh Kumar K V wrote: > On 9/29/23 2:00 AM, Vishal Verma wrote: > > Large amounts of memory managed by the kmem driver may come in via CXL, > > and it is often desirable to have the memmap for this memory on the new > > memory itself. > > > > Enroll kmem-manage

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

2023-10-06 Thread Verma, Vishal L
On Thu, 2023-10-05 at 14:20 -0700, Dan Williams wrote: > Vishal Verma wrote: <..> > > > > --- a/mm/memory_hotplug.c > > +++ b/mm/memory_hotplug.c > > @@ -1380,6 +1380,44 @@ static bool mhp_supports_memmap_on_memory(unsigned > > long size) > > return arch_supports_memmap_on_memory(vmemmap_

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

2023-10-06 Thread Verma, Vishal L
On Fri, 2023-10-06 at 14:52 +0200, David Hildenbrand wrote: > On 05.10.23 20:31, Vishal Verma wrote: > > <..> > > @@ -2167,47 +2221,28 @@ static int __ref try_remove_memory(u64 start, u64 > > size) > > if (rc) > > return rc; > >   > > +   mem_hotplug_begin(); > > + >

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

2023-10-11 Thread Verma, Vishal L
On Mon, 2023-10-09 at 17:04 +0200, David Hildenbrand wrote: > On 07.10.23 10:55, Huang, Ying wrote: > > Vishal Verma writes: > > > > > @@ -2167,47 +2221,28 @@ static int __ref try_remove_memory(u64 start, u64 > > > size) > > > if (rc) > > > return rc; > > >   > > > +

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

2023-10-16 Thread Verma, Vishal L
On Thu, 2023-10-12 at 10:40 +0200, David Hildenbrand wrote: > On 12.10.23 07:53, Verma, Vishal L wrote: > > On Mon, 2023-10-09 at 17:04 +0200, David Hildenbrand wrote: > > > On 07.10.23 10:55, Huang, Ying wrote: > > > > Vishal Verma writes: > <..> &

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

2023-10-16 Thread Verma, Vishal L
On Thu, 2023-10-05 at 14:16 -0700, Dan Williams wrote: > Vishal Verma wrote: > > <..> > > + > > +   rc = kstrtobool(buf, &val); > > +   if (rc) > > +   return rc; > > Perhaps: > > if (dev_dax->memmap_on_memory == val) > return len; > > ...and skip the check below wh

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

2023-10-16 Thread Verma, Vishal L
On Tue, 2023-10-17 at 13:18 +0800, Huang, Ying wrote: > "Verma, Vishal L" writes: > > > On Thu, 2023-10-05 at 14:16 -0700, Dan Williams wrote: > > > Vishal Verma wrote: > > > > > > <..> > > > > >

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

2023-10-30 Thread Verma, Vishal L
On Mon, 2023-10-30 at 11:20 +0100, David Hildenbrand wrote: > On 26.10.23 00:44, Vishal Verma wrote: > > [..] > > @@ -2146,11 +2186,69 @@ void try_offline_node(int nid) > >   } > >   EXPORT_SYMBOL(try_offline_node); > >   > > -static int __ref try_remove_memory(u64 start, u64 size) > > +static v

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

2023-11-01 Thread Verma, Vishal L
On Thu, 2023-11-02 at 09:16 +0800, Huang, Ying wrote: > Vishal Verma writes: > [..] > > + > > +static int create_altmaps_and_memory_blocks(int nid, struct memory_group > > *group, > > +   u64 start, u64 size) > > +{ > > +   unsigned long memblock_size

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

2023-11-03 Thread Verma, Vishal L
On Fri, 2023-11-03 at 09:43 -0700, fan wrote: > On Wed, Nov 01, 2023 at 04:51:52PM -0600, Vishal Verma wrote: > > [..] > >   > > +static void __ref remove_memory_blocks_and_altmaps(u64 start, u64 size) > > +{ > > +   unsigned long memblock_size = memory_block_size_bytes(); > > +   u64 cur_

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

2023-12-07 Thread Verma, Vishal L
On Thu, 2023-12-07 at 08:29 +, Zhijian Li (Fujitsu) wrote: > Hi Vishal, > > > On 07/12/2023 12:36, Vishal Verma wrote: > > + > > +What:  /sys/bus/dax/devices/daxX.Y/memmap_on_memory > > +Date:  October, 2023 > > +KernelVersion: v6.8 > > +Contact:   nvd...@lists.linux.dev >

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

2023-12-08 Thread Verma, Vishal L
On Fri, 2023-12-08 at 09:20 +, Zhijian Li (Fujitsu) wrote: > > > On 08/12/2023 03:25, Verma, Vishal L wrote: > > On Thu, 2023-12-07 at 08:29 +, Zhijian Li (Fujitsu) wrote: > > > Hi Vishal, > > > > > > > > > On 07/12/2023 12:36, Vishal

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

2023-12-08 Thread Verma, Vishal L
On Fri, 2023-12-08 at 11:13 +0800, Huang, Ying wrote: > Vishal Verma writes: > [..] > > > > + > > +static ssize_t memmap_on_memory_store(struct device *dev, > > + struct device_attribute *attr, > > + const char *buf, size_t

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

2023-12-08 Thread Verma, Vishal L
On Fri, 2023-12-08 at 12:36 +0100, David Hildenbrand wrote: > On 07.12.23 05:36, Vishal Verma wrote: [..] > > > > + > > +What:  /sys/bus/dax/devices/daxX.Y/memmap_on_memory > > +Date:  October, 2023 > > +KernelVersion: v6.8 > > +Contact:   nvd...@lists.linux.dev > > +Descriptio

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

2023-12-11 Thread Verma, Vishal L
On Tue, 2023-12-12 at 08:30 +0800, Huang, Ying wrote: > Vishal Verma writes: > > > Add a sysfs knob for dax devices to control the memmap_on_memory setting > > if the dax device were to be hotplugged as system memory. > > > > The default memmap_on_memory setting for dax devices originating via >

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

2023-12-11 Thread Verma, Vishal L
On Tue, 2023-12-12 at 08:56 +0800, Huang, Ying wrote: > "Verma, Vishal L" writes: > > > On Tue, 2023-12-12 at 08:30 +0800, Huang, Ying wrote: > > > > > > > + > > > > +static ssize_t memmap_on_memory_store(struct device *dev, > > >

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

2023-12-13 Thread Verma, Vishal L
On Wed, 2023-12-13 at 15:02 -0800, Dan Williams wrote: > At present there are ~200 usages of device_lock() in the kernel. Some of > those usages lead to "goto unlock;" patterns which have proven to be > error prone. Define a "device" guard() definition to allow for those to "Define a definition" s

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

2023-12-14 Thread Verma, Vishal L
On Fri, 2023-12-15 at 05:56 +, Matthew Wilcox wrote: > On Thu, Dec 14, 2023 at 10:25:27PM -0700, Vishal Verma wrote: > > @@ -294,13 +294,10 @@ static ssize_t available_size_show(struct device *dev, > > struct device_attribute *attr, char *buf) > >  { > > struct dax_regio

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

2023-12-15 Thread Verma, Vishal L
On Fri, 2023-12-15 at 09:15 -0800, Dan Williams wrote: > Greg Kroah-Hartman wrote: > > On Thu, Dec 14, 2023 at 10:25:27PM -0700, Vishal Verma wrote: > > > Use the guard(device) macro to lock a 'struct device', and unlock it > > > automatically when going out of scope using Scope Based Resource > >

[GIT PULL] nvdimm fixes v5.19-rc5

2022-07-01 Thread Verma, Vishal L
Hi Linus, please pull from: git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm tags/libnvdimm-fixes-5.19-rc5 ...to receive a fix for v5.19-rc5. It has been in -next for a week with no reported issues. --- The following changes since commit a111daf0c53ae91e71fd2bfe7497862d14132e3e:

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

2022-11-16 Thread Verma, Vishal L
On Wed, 2022-11-16 at 15:46 +0300, Kirill A. Shutemov wrote: > On Wed, Nov 16, 2022 at 12:57:36AM -0700, Vishal Verma wrote: > > In a system with a single initiator node, and one or more memory-only > > 'target' nodes, the memory-only node(s) would fail to register their > > initiator node correctl

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

2023-01-25 Thread Verma, Vishal L
On Sat, 2023-01-14 at 09:50 +0100, 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 corre

Re: [PATCH] dax/kmem: Pass valid argument to memory_group_register_static

2023-06-20 Thread Verma, Vishal L
On Wed, 2023-06-21 at 11:36 +0530, Tarun Sahu wrote: > Hi Alison, > > Alison Schofield writes: > > > On Tue, Jun 20, 2023 at 07:33:32PM +0530, Tarun Sahu wrote: > > > memory_group_register_static takes maximum number of pages as the argument > > > while dev_dax_kmem_probe passes total_len (in by

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

2023-06-21 Thread Verma, Vishal L
On Fri, 2023-06-16 at 09:44 +0200, David Hildenbrand wrote: > On 16.06.23 00:00, Vishal Verma wrote: > > The dax/kmem driver can potentially hot-add large amounts of memory > > originating from CXL memory expanders, or NVDIMMs, or other 'device > > memories'. There is a chance there isn't enough re

[GIT PULL] NVDIMM and DAX for 6.5

2023-06-30 Thread Verma, Vishal L
Hi Linus, please pull from git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm.git tags/libnvdimm-for-6.5 ... to receive the libnvdimm and DAX update for v6.5. This is mostly small cleanups and fixes, with the biggest change being the change to the DAX fault handler allowing it to re

Re: [PATCH] ACPI: NFIT: add helper to_nfit_mem() to take device to nfit_mem

2023-07-05 Thread Verma, Vishal L
On Mon, 2023-07-03 at 14:17 +0100, Ben Dooks wrote: > Add a quick helper to just do struct device to the struct nfit_mem > field it should be referencing. This reduces the number of code > lines in some of the followgn code as it removes the intermediate > struct nvdimm. > > Signed-off-by: Ben Doo

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

2023-07-12 Thread Verma, Vishal L
On Tue, 2023-07-11 at 17:21 +0200, David Hildenbrand wrote: > On 11.07.23 16:30, Aneesh Kumar K.V wrote: > > David Hildenbrand writes: > > > > > > Maybe the better alternative is teach > > > add_memory_resource()/try_remove_memory() to do that internally. > > > > > > In the add_memory_resource()

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

2023-07-13 Thread Verma, Vishal L
On Thu, 2023-07-13 at 09:23 +0200, David Hildenbrand wrote: > On 13.07.23 08:45, Verma, Vishal L wrote: > > > > I'm taking a shot at implementing the splitting internally in > > memory_hotplug.c. The caller (kmem) side does become trivial with this > > approach, b

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

2023-07-13 Thread Verma, Vishal L
On Thu, 2023-07-13 at 17:23 +0200, David Hildenbrand wrote: > On 13.07.23 17:15, Verma, Vishal L wrote: > > On Thu, 2023-07-13 at 09:23 +0200, David Hildenbrand wrote: > > > On 13.07.23 08:45, Verma, Vishal L wrote: > > > > > > > > I'm taking a s

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

2023-08-01 Thread Verma, Vishal L
On Mon, 2023-07-24 at 11:16 +0800, Huang, Ying wrote: > "Aneesh Kumar K.V" writes: > > > > > @@ -1339,27 +1367,20 @@ int __ref add_memory_resource(int nid, > > > struct resource *res, mhp_t mhp_flags) > > > /* > > > * Self hosted memmap array > > > */ > > > -   if (m

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

2023-08-01 Thread Verma, Vishal L
On Mon, 2023-07-24 at 13:54 +0800, Huang, Ying wrote: > Vishal Verma writes: > > > > > @@ -2035,12 +2056,38 @@ void try_offline_node(int nid) > >  } > >  EXPORT_SYMBOL(try_offline_node); > >   > > -static int __ref try_remove_memory(u64 start, u64 size) > > +static void __ref __try_remove_memory

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

2023-08-02 Thread Verma, Vishal L
On Wed, 2023-08-02 at 15:20 +0100, Jonathan Cameron wrote: > On Tue, 01 Aug 2023 23:55:37 -0600 > Vishal Verma wrote: > > > The MHP_MEMMAP_ON_MEMORY flag for hotplugged memory is restricted to > > 'memblock_size' chunks of memory being added. Adding a larger span of > > memory precludes memmap_on

Re: [PATCH v2] nd_btt: Make BTT lanes preemptible

2023-09-22 Thread Verma, Vishal L
On Wed, 2023-09-20 at 07:37 +0200, Tomas Glozar wrote: > nd_region_acquire_lane uses get_cpu, which disables preemption. This is > an issue on PREEMPT_RT kernels, since btt_write_pg and also > nd_region_acquire_lane itself take a spin lock, resulting in BUG: > sleeping function called from invalid

Re: [PATCH 5/5] dax: "Hotplug" persistent memory for use like normal RAM

2019-01-25 Thread Verma, Vishal L
On Fri, 2019-01-25 at 09:18 -0800, Dan Williams wrote: > On Fri, Jan 25, 2019 at 12:20 AM Du, Fan wrote: > > Dan > > > > Thanks for the insights! > > > > Can I say, the UCE is delivered from h/w to OS in a single way in > > case of machine > > check, only PMEM/DAX stuff filter out UC address an

[GIT PULL] libnvdimm for v5.9

2020-08-10 Thread Verma, Vishal L
Hi Linus, please pull from: git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm.git/ tags/libnvdimm-for-5.9 ...to receive a new feature in libnvdimm - 'Runtime Firmware Activation', and a few small cleanups and fixes in libnvdimm and DAX. You'd normally receive this pull request from D

Re: 回复: [PATCH v2] libnvdimm: KASAN: global-out-of-bounds Read in internal_create_group

2020-08-18 Thread Verma, Vishal L
On Wed, 2020-08-19 at 03:23 +, Zhang, Qiang wrote: > cc: Dan Williams > Please review. Hi Qiang, I've got this queued up, I'll submit it for -rc2. Thanks, -Vishal > > > 发件人: linux-kernel-ow...@vger.kernel.org > 代表 qiang.zh...@windriver.com > 发送时间

Re: [RFC PATCH v2 00/14] CXL 2.0 Support

2020-12-08 Thread Verma, Vishal L
On Tue, 2020-12-08 at 16:24 -0800, Ben Widawsky wrote: > Changes since v1 [1] > > A few additions have been made: > - IOCTL (UAPI) interface has been added with commands > - Kernel docs have been created > - A new debug macro is introduced and sprinkled throughout. > > A deletion was made: >

Re: [PATCH 2/3] cxl/mem: Print unknown capability IDs as hex

2021-04-15 Thread Verma, Vishal L
On Thu, 2021-04-15 at 16:26 -0700, Ben Widawsky wrote: > Trivial. The spec lists these as hex, so do the same here to make > debugging easier. > > Fixes: 8adaf747c9f0b ("cxl/mem: Find device capabilities") > Signed-off-by: Ben Widawsky > --- >  drivers/cxl/mem.c | 2 +- >  1 file changed, 1 insert

Re: [PATCH 3/3] cxl/mem: Demarcate vendor specific capability IDs

2021-04-15 Thread Verma, Vishal L
On Thu, 2021-04-15 at 16:27 -0700, Ben Widawsky wrote: > Vendor capabilities occupy 0x8000 to 0x according to CXL 2.0 spec > 8.2.8.2.1 CXL Device Capabilities. While they are not defined by the > spec, they are allowed and not "unknown". Call this detail out in the > logs to let users easily di

Re: [PATCH] cxl/mem: Fix memory device capacity probing

2021-04-16 Thread Verma, Vishal L
On Fri, 2021-04-16 at 17:43 -0700, Dan Williams wrote: > The CXL Identify Memory Device output payload emits capacity in 256MB > units. The driver is treating the capacity field as bytes. This was > missed because QEMU reports bytes when it should report bytes / 256MB. > > Fixes: 8adaf747c9f0 ("cx

Re: [PATCH 1/1] ACPI/nfit: correct the badrange to be reported in nfit_handle_mce()

2020-11-18 Thread Verma, Vishal L
On Wed, 2020-11-18 at 16:41 +0800, Zhen Lei wrote: > The badrange to be reported should always cover mce->addr. > > Signed-off-by: Zhen Lei > --- > drivers/acpi/nfit/mce.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) Ah good find, agreed with Dan that this is stable material. Minor n

Re: [RFC PATCH 0/9] CXL 2.0 Support

2020-12-04 Thread Verma, Vishal L
On Fri, 2020-12-04 at 10:12 -0800, Ben Widawsky wrote: > Hi Chris. > > On 20-12-04 12:40:03, Chris Browy wrote: [..] > > >acpidump indicates the CXL0 and CXLM devices but no SRAT or HMAT tables > > are > >in the dump which is curious. > > I don't typically use HMAT, but I do have an SRA

Re: [RFC PATCH v3 02/16] cxl/acpi: Add an acpi_cxl module for the CXL interconnect

2021-01-20 Thread Verma, Vishal L
On Tue, 2021-01-12 at 18:43 +, Jonathan Cameron wrote: > On Mon, 11 Jan 2021 14:51:06 -0800 > Ben Widawsky wrote: > > > From: Vishal Verma > > > > Add an acpi_cxl module to coordinate the ACPI portions of the CXL > > (Compute eXpress Link) interconnect. This driver binds to ACPI0017 > > obj

Re: [RFC PATCH v3 02/16] cxl/acpi: Add an acpi_cxl module for the CXL interconnect

2021-01-20 Thread Verma, Vishal L
On Wed, 2021-01-13 at 13:40 +0100, Rafael J. Wysocki wrote: > On Tue, Jan 12, 2021 at 1:29 AM Ben Widawsky wrote: > > > > From: Vishal Verma > > > > Add an acpi_cxl module to coordinate the ACPI portions of the CXL > > (Compute eXpress Link) interconnect. This driver binds to ACPI0017 > > objec

Re: [PATCH v2] libnvdimm: Notify disk drivers to revalidate region read-only

2021-03-10 Thread Verma, Vishal L
On Tue, 2021-03-09 at 17:43 -0800, Dan Williams wrote: > Previous kernels allowed the BLKROSET to override the disk's read-only > status. With that situation fixed the pmem driver needs to rely on > notification events to reevaluate the disk read-only status after the > host region has been marked

Re: [PATCH] ACPI: NFIT: Fix flexible_array.cocci warnings

2021-01-05 Thread Verma, Vishal L
On Tue, 2021-01-05 at 13:03 -0800, Dan Williams wrote: > Julia and 0day report: > > Zero-length and one-element arrays are deprecated, see > Documentation/process/deprecated.rst > Flexible-array members should be used instead. > > However, a straight conversion to flexible arrays yiel

Re: [PATCH v2 5/5] dax: handle media errors in dax_do_io

2016-04-15 Thread Verma, Vishal L
On Fri, 2016-04-15 at 12:11 -0400, Jeff Moyer wrote: > Vishal Verma writes: > > > > > dax_do_io (called for read() or write() for a dax file system) may > > fail > > in the presence of bad blocks or media errors. Since we expect that > > a > > write should clear media errors on nvdimms, make dax

Re: [PATCH] libnvdimm, pmem: clarify the write+clear_poison+write flow

2016-04-15 Thread Verma, Vishal L
On Thu, 2016-04-14 at 19:40 -0700, Dan Williams wrote: > The ACPI specification does not specify the state of data after a > clear > poison operation.  Potential future libnvdimm bus implementations for > other architectures also might not specify or disagree on the state > of > data after clear po

Re: [PATCH] libnvdimm, btt: add btt startup debug

2016-04-15 Thread Verma, Vishal L
On Thu, 2016-04-14 at 19:40 -0700, Dan Williams wrote: > Report the reason for btt probe failures when debug is enabled. > > Signed-off-by: Dan Williams > --- >  drivers/nvdimm/btt.c |6 +- >  1 file changed, 5 insertions(+), 1 deletion(-) Reveiwed-by: Vishal Verma > > diff --git a/dri

Re: [PATCH v2 5/5] dax: handle media errors in dax_do_io

2016-04-15 Thread Verma, Vishal L
On Fri, 2016-04-15 at 13:11 -0400, Jeff Moyer wrote: > "Verma, Vishal L" writes: > > > > > On Fri, 2016-04-15 at 12:11 -0400, Jeff Moyer wrote: > > > > > > Vishal Verma writes: > > > > > > > > + if (IS_DAX(inode

Re: [PATCH v4 5/7] fs: prioritize and separate direct_io from dax_io

2016-05-02 Thread Verma, Vishal L
On Mon, 2016-05-02 at 19:03 +0300, Boaz Harrosh wrote: > On 05/02/2016 06:51 PM, Vishal Verma wrote: > > > > On Mon, 2016-05-02 at 18:41 +0300, Boaz Harrosh wrote: > > > > > > On 04/29/2016 12:16 AM, Vishal Verma wrote: > > > > > > > > > > > > All IO in a dax filesystem used to go through dax_d

Re: [PATCH v2 5/5] dax: handle media errors in dax_do_io

2016-05-02 Thread Verma, Vishal L
On Tue, 2016-05-03 at 09:04 +1000, Dave Chinner wrote: > On Mon, May 02, 2016 at 11:18:36AM -0400, Jeff Moyer wrote: > > > > Dave Chinner writes: > > > > > > > > On Mon, Apr 25, 2016 at 11:53:13PM +, Verma, Vishal L wrote: > > > > >

Re: [PATCH v4 5/7] fs: prioritize and separate direct_io from dax_io

2016-05-05 Thread Verma, Vishal L
On Thu, 2016-05-05 at 07:24 -0700, Christoph Hellwig wrote: > On Mon, May 02, 2016 at 06:41:51PM +0300, Boaz Harrosh wrote: > > > > > > > > All IO in a dax filesystem used to go through dax_do_io, which > > > cannot > > > handle media errors, and thus cannot provide a recovery path that > > > can

Re: [PATCH v4 5/7] fs: prioritize and separate direct_io from dax_io

2016-05-05 Thread Verma, Vishal L
On Thu, 2016-05-05 at 08:15 -0700, Dan Williams wrote: > On Thu, May 5, 2016 at 7:24 AM, Christoph Hellwig > wrote: > > > > On Mon, May 02, 2016 at 06:41:51PM +0300, Boaz Harrosh wrote: > > > > > > > > > > > All IO in a dax filesystem used to go through dax_do_io, which > > > > cannot > > > > h

Re: [PATCH v4 5/7] fs: prioritize and separate direct_io from dax_io

2016-05-05 Thread Verma, Vishal L
On Thu, 2016-05-05 at 08:22 -0700, Christoph Hellwig wrote: > On Thu, May 05, 2016 at 08:15:32AM -0700, Dan Williams wrote: > > > > > > > > Agreed - makig O_DIRECT less direct than not having it is plain > > > stupid, > > > and I somehow missed this initially. > > Of course I disagree because lik

Re: [PATCH v4 5/7] fs: prioritize and separate direct_io from dax_io

2016-05-08 Thread Verma, Vishal L
On Sun, 2016-05-08 at 02:01 -0700, h...@infradead.org wrote: > On Thu, May 05, 2016 at 09:45:07PM +0000, Verma, Vishal L wrote: > > > > I'm not sure I completely understand how this will work? Can you > > explain > > a bit? Would we have to export rw_bytes up to

Re: [PATCH v5 3/5] dax: use sb_issue_zerout instead of calling dax_clear_sectors

2016-05-08 Thread Verma, Vishal L
On Sun, 2016-05-08 at 01:52 -0700, Christoph Hellwig wrote: > On Fri, May 06, 2016 at 03:53:09PM -0600, Vishal Verma wrote: > > > > From: Matthew Wilcox > > > > dax_clear_sectors() cannot handle poisoned blocks.  These must be > > zeroed using the BIO interface instead.  Convert ext2 and XFS to

Re: [PATCH v6 4/5] dax: for truncate/hole-punch, do zeroing through the driver if possible

2016-05-10 Thread Verma, Vishal L
On Tue, 2016-05-10 at 12:25 -0700, Christoph Hellwig wrote: > Hi Vishal, > > can you also pick up the my patch to add a low-level __dax_zero_range > that I cced you on?  That way we can avoid a nasty merge conflict with > my xfs/iomap changes. Good idea - I'll do that for the next posting. I'll w

Re: [PATCH v6 4/5] dax: for truncate/hole-punch, do zeroing through the driver if possible

2016-05-11 Thread Verma, Vishal L
On Wed, 2016-05-11 at 10:15 +0200, Jan Kara wrote: > On Tue 10-05-16 12:49:15, Vishal Verma wrote: > > > > In the truncate or hole-punch path in dax, we clear out sub-page > > ranges. > > If these sub-page ranges are sector aligned and sized, we can do the > > zeroing through the driver instead so

Re: [PATCH v6 4/5] dax: for truncate/hole-punch, do zeroing through the driver if possible

2016-05-11 Thread Verma, Vishal L
On Tue, 2016-05-10 at 12:49 -0600, Vishal Verma wrote: >  ... > @@ -1240,11 +1254,16 @@ int dax_zero_page_range(struct inode *inode, > loff_t from, unsigned length, >   .size = PAGE_SIZE, >   }; >   > - if (dax_map_atomic(bdev, &dax) < 0) > -

Re: [PATCH v4 0/6] Add alignment check for DAX mount

2016-05-20 Thread Verma, Vishal L
On Fri, 2016-05-20 at 14:50 +, Kani, Toshimitsu wrote: > On Thu, 2016-05-19 at 18:37 -0500, Eric Sandeen wrote: > > > > On 5/10/16 11:23 AM, Toshi Kani wrote: > > > > > > > > > When a partition is not aligned by 4KB, mount -o dax succeeds, > > Sorry for being late, but - > > > > Shouldn't t

Re: [PATCH v7 4/6] dax: export a low-level __dax_zero_page_range helper

2016-05-12 Thread Verma, Vishal L
On Thu, 2016-05-12 at 10:41 +0200, Jan Kara wrote: > On Wed 11-05-16 15:08:50, Vishal Verma wrote: > > > > From: Christoph Hellwig > > > > This allows XFS to perform zeroing using the iomap infrastructure > > and > > avoid buffer heads. > > > > [vishal: fix conflicts with dax-error-handling] >

Re: [PATCH 01/11] block: nvme-scsi: Fix probable mask then right shift defects

2014-11-10 Thread Verma, Vishal L
On Sun, 2014-10-26 at 22:24 -0700, Joe Perches wrote: > Precedence of & and >> is not the same and is not left to right. > shift has higher precedence and should be done after the mask. > > Add parentheses around the mask. > > Signed-off-by: Joe Perches Acked-by: Vishal Verma > --- > drivers

Re: [Linux-nvdimm] [PATCH v2 19/20] nd_btt: atomic sector updates

2015-05-18 Thread Verma, Vishal L
On Sun, 2015-05-17 at 01:19 +, Elliott, Robert (Server Storage) wrote: > > -Original Message- > > From: Linux-nvdimm [mailto:linux-nvdimm-boun...@lists.01.org] On Behalf Of > > Dan Williams > > Sent: Tuesday, April 28, 2015 1:26 PM > > To: linux-nvd...@lists.01.org > > Cc: Ingo Molnar;

Re: [PATCH 1/3] nfit, libnvdimm: clear poison command support

2016-03-09 Thread Verma, Vishal L
On Tue, 2016-03-08 at 14:47 -0800, Dan Williams wrote: > Add the boiler-plate for a 'clear error' command based on section > 9.20.7.6 "Function Index 4 - Clear Uncorrectable Error" from the ACPI > 6.1 specification, and add a reference implementation in nfit_test. > > Cc: Vishal Verma > Signed-of

Re: [PATCH 0/3] nfit, libnvdimm, pmem: clear poison support

2016-03-09 Thread Verma, Vishal L
On Tue, 2016-03-08 at 14:47 -0800, Dan Williams wrote: > ACPI 6.1 introduces the ability to send "clear error" commands to the > ACPI0012:00 device representing the root of an "nvdimm bus". > > Similar to relocating a bad block on a disk, this support clears > media errors in response to a write.

Re: [PATCH 3/3] libnvdimm, pmem: clear poison on write

2016-03-10 Thread Verma, Vishal L
On Tue, 2016-03-08 at 14:47 -0800, Dan Williams wrote: > If a write is directed at a known bad block perform the following: > > 1/ write the data > > 2/ send a clear poison command > > 3/ invalidate the poison out of the cache hierarchy > > Cc: > Cc: Vishal Verma > Cc: Ross Zwisler > Signed-

Re: [PATCH v2 5/5] dax: handle media errors in dax_do_io

2016-04-23 Thread Verma, Vishal L
On Wed, 2016-04-20 at 13:59 -0700, Christoph Hellwig wrote: > On Fri, Apr 15, 2016 at 12:11:36PM -0400, Jeff Moyer wrote: > > > > > > > > + if (IS_DAX(inode)) { > > > + ret = dax_do_io(iocb, inode, iter, offset, > > > blkdev_get_block, > > >   NULL, DIO_SKIP_DIO_CO

Re: [PATCH v2 5/5] dax: handle media errors in dax_do_io

2016-04-25 Thread Verma, Vishal L
On Mon, 2016-04-25 at 01:31 -0700, h...@infradead.org wrote: > On Sat, Apr 23, 2016 at 06:08:37PM +0000, Verma, Vishal L wrote: > > > > direct_IO might fail with -EINVAL due to misalignment, or -ENOMEM > > due > > to some allocation failing, and I thought we sho

Re: [PATCH v2 5/5] dax: handle media errors in dax_do_io

2016-04-25 Thread Verma, Vishal L
On Tue, 2016-04-26 at 09:25 +1000, Dave Chinner wrote: >  <> > > > > - It checks badblocks and discovers it's files have lost data > Lots of hand-waving here. How does the application map a bad > "sector" to a file without scanning the entire filesystem to find > the owner of the bad sector? Yes

Re: [PATCH 2/2] drivers/dax/kmem: give a warning if CONFIG_DEV_DAX_PMEM_COMPAT is enabled

2019-08-22 Thread Verma, Vishal L
On Thu, 2019-08-22 at 14:55 -0400, Jeff Moyer wrote: > > When using daxctl to online memory, you already get the following > message: > > libdaxctl: daxctl_dev_disable: dax0.0: error: device model is dax-class > > That's still not very helpful. It would be better if the message > suggested a fi

Re: [PATCH] libnvdimm, region: Use struct_size() in kzalloc()

2019-08-28 Thread Verma, Vishal L
On Mon, 2019-06-10 at 16:06 -0500, Gustavo A. R. Silva wrote: > One of the more common cases of allocation size calculations is > finding > the size of a structure that has a zero-sized array at the end, along > with memory for some number of elements for that array. For example: > > struct nd_reg

Re: [PATCH] libnvdimm, region: Use struct_size() in kzalloc()

2019-08-28 Thread Verma, Vishal L
On Wed, 2019-08-28 at 14:36 -0500, Gustavo A. R. Silva wrote: > struct_size() does not apply to those scenarios. See below... > > > [1]: > > https://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm.git/tree/drivers/nvdimm/region_devs.c#n1030 > > struct_size() only applies to structures of

Re: [Ksummit-discuss] [PATCH v2 2/3] Maintainer Handbook: Maintainer Entry Profile

2019-09-11 Thread Verma, Vishal L
On Wed, 2019-09-11 at 08:48 -0700, Dan Williams wrote: > diff --git a/MAINTAINERS b/MAINTAINERS > index 3f171339df53..e5d111a86e61 100644 > --- a/MAINTAINERS > +++ b/MAINTAINERS > @@ -98,6 +98,10 @@ Descriptions of section entries: > Obsolete:Old code. Something tagged obsolete genera

Re: [PATCH 11/13] nvdimm: Use more common logic testing styles and bare ; positions

2019-09-11 Thread Verma, Vishal L
On Wed, 2019-09-11 at 19:54 -0700, Joe Perches wrote: > Avoid using uncommon logic testing styles to make the code a > bit more like other kernel code. > > e.g.: > if (foo) { > ; > } else { > > } > > is typically written > > if (!foo) { >

Re: [PATCH v2 3/7] libnvdimm/region: Register badblocks before namespaces

2019-07-18 Thread Verma, Vishal L
On Wed, 2019-07-17 at 18:08 -0700, Dan Williams wrote: > Namespace activation expects to be able to reference region badblocks. > The following warning sometimes triggers when asynchronous namespace > activation races in front of the completion of namespace probing. Move > all possible namespace p

Re: [PATCH v2 4/7] libnvdimm/bus: Prepare the nd_ioctl() path to be re-entrant

2019-07-18 Thread Verma, Vishal L
On Wed, 2019-07-17 at 18:08 -0700, Dan Williams wrote: > In preparation for not holding a lock over the execution of > nd_ioctl(), > update the implementation to allow multiple threads to be attempting > ioctls at the same time. The bus lock still prevents multiple in- > flight > ->ndctl() invocat

Re: [RFC] Memory Tiering

2019-10-17 Thread Verma, Vishal L
On Thu, 2019-10-17 at 07:17 -0700, Dave Hansen wrote: > On 10/17/19 1:07 AM, David Hildenbrand wrote: > > Very interesting topic. I heard similar demand from HPC folks > > (especially involving other memory types ("tiers")). There, I think > > you often want to let the application manage that. Bu

Re: [PATCH] acpi/nfit: Fix bus command validation

2019-02-07 Thread Verma, Vishal L
On Thu, 2019-02-07 at 15:57 -0800, Dan Williams wrote: > Commit 11189c1089da "acpi/nfit: Fix command-supported detection" broke > ND_CMD_CALL for bus-level commands. The "func = cmd" assumption is only > valid for: > > ND_CMD_ARS_CAP > ND_CMD_ARS_START > ND_CMD_ARS_STATUS > ND_CMD

Re: [v5 0/3] "Hotremove" persistent memory

2019-05-02 Thread Verma, Vishal L
On Thu, 2019-05-02 at 14:43 -0400, Pavel Tatashin wrote: > The series of operations look like this: > > 1. After boot restore /dev/pmem0 to ramdisk to be consumed by apps. >and free ramdisk. > 2. Convert raw pmem0 to devdax >ndctl create-namespace --mode devdax --map mem -e namespace0.0 -f

Re: [RESEND PATCH] nvdimm: fix some compilation warnings

2019-06-26 Thread Verma, Vishal L
On Wed, 2019-06-26 at 17:00 -0400, Qian Cai wrote: > > Verma, are you still working on this? I can still see this warning in the > latest > linux-next. > > drivers/nvdimm/btt.c: In function 'btt_read_pg': > drivers/nvdimm/btt.c:1272:8: warning: variable 'rc' set but not used > [-Wunused-but-set

Re: [PATCH] nvdimm: btt_devs: fix a NULL pointer dereference and a memory leak

2019-03-22 Thread Verma, Vishal L
On Tue, 2019-03-12 at 03:15 -0500, Kangjie Lu wrote: > In case kmemdup fails, the fix releases resources and returns to > avoid the NULL pointer dereference. > Also, the error paths in the following code should release > resources to avoid memory leaks. > > Signed-off-by: Kangjie Lu > --- > driv

Re: [PATCH] libnvdimm/namespace: Clean up holder_class_store()

2019-03-04 Thread Verma, Vishal L
On Mon, 2019-03-04 at 12:14 -0800, Dan Williams wrote: > Use sysfs_streq() in place of open-coded strcmp()'s that check for an > optional "\n" at the end of the input. > > Signed-off-by: Dan Williams > --- > drivers/nvdimm/namespace_devs.c |8 > 1 file changed, 4 insertions(+), 4 de

Re: [PATCH] libnvdimm: use consistent naming for request_mem_region()

2016-11-28 Thread Verma, Vishal L
On Mon, 2016-11-28 at 11:25 -0800, Dan Williams wrote: > Here is an example /proc/iomem listing for a system with 2 > namespaces, > one in "sector" mode and one in "memory" mode: > >   1fc00-2fbff : Persistent Memory (legacy) > 1fc00-2fbff : namespace1.0 >   34000-34fff

Re: [PATCH] acpi, nfit: fix acpi event notifications for nfit

2016-08-18 Thread Verma, Vishal L
On Thu, 2016-08-18 at 12:54 -0700, Dan Williams wrote: > On Thu, Aug 18, 2016 at 12:52 PM, Linda Knippers om> wrote: > > > > > > > > On 8/18/2016 3:48 PM, Dan Williams wrote: > > > > > > On Thu, Aug 18, 2016 at 11:48 AM, Vishal Verma > > el.com> wrote: > > > > > > > > The nfit driver had an

Re: [PATCH 0/8] nfit, libnvdimm: async address range scrub

2016-03-01 Thread Verma, Vishal L
On Tue, 2016-02-23 at 18:16 -0800, Dan Williams wrote: > Given the capacities of next generation persistent memory devices a > scrub operation to find all poison may take 10s of seconds.  We want > this scrub work to be done asynchronously with the rest of system > initialization, so we move it out

Re: [PATCH] nfit: acpi_nfit_notify(): Do not leave device locked

2015-12-11 Thread Verma, Vishal L
On 12/11/15, 13:24, "Alexey Khoroshilov" wrote: >Even if dev->driver is null because we are being removed, >it is safer to not leave device locked. > >Found by Linux Driver Verification project (linuxtesting.org). > >Signed-off-by: Alexey Khoroshilov >--- > drivers/acpi/nfit.c | 2 +- > 1 file ch

[GIT PULL] libnvdimm fixes for v5.9-rc3

2020-08-24 Thread Verma, Vishal L
Hi Linus, please pull from: git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm.git tags/libnvdimm-fix-v5.9-rc3 ...to receive a couple of minor fixes for things merged in 5.9-rc1. One is an out-of-bounds access caught by KASAN, and the second is a tweak to some overzealous logging about d

Re: [PATCH] acpi/nfit: Use kobj_to_dev() instead

2020-08-14 Thread Verma, Vishal L
On Fri, 2020-08-14 at 17:28 +0200, Rafael J. Wysocki wrote: > On Thu, Aug 13, 2020 at 4:54 AM Wang Qing wrote: > > Use kobj_to_dev() instead of container_of() > > > > Signed-off-by: Wang Qing > > LGTM > > Dan, any objections? Looks good to me - you can add: Acked-by: Vishal Verma > > > ---

  1   2   >