Re: [PATCH ndctl] Build: Fix deprecated str.format() usage

2024-05-01 Thread Dan Williams
Vishal Verma wrote: > From: Dan Williams > > New versions of Meson throw a warning around ndctl's use of > 'str.format': > > WARNING: Broken features used: >* 1.3.0: {'str.format: Value other than strings, integers, bools, options, > dictionaries and l

Re: [RFC 04/10] fs/dax: Don't track page mapping/index

2024-04-15 Thread Dan Williams
Alistair Popple wrote: > > Dan Williams writes: > > > Alistair Popple wrote: > >> I was initially concerned about these cases because I was wondering if > >> folio subpages could ever get different mappings and the shared case > >> implied th

Re: [RFC 04/10] fs/dax: Don't track page mapping/index

2024-04-15 Thread Dan Williams
Alistair Popple wrote: > I was initially concerned about these cases because I was wondering if > folio subpages could ever get different mappings and the shared case > implied they could. But it seems that's xfs specific and there is a > separate mechanism to deal with looking up ->mapping/index

Re: [PATCH ndctl 2/2] daxctl/device.c: Fix error propagation in do_xaction_device()

2024-04-12 Thread Dan Williams
ceX.0 can not be deleted since the deletion there is exclusively done by setting namespace size to zero. I think this daxctl change has a low risk of breaking folks because the primary failure case is fixed to swallow the error. Reviewed-by: Dan Williams

Re: [PATCH ndctl 1/2] daxctl/device.c: Handle special case of destroying daxX.0

2024-04-12 Thread Dan Williams
ed. > > Add an expectation in daxctl's dev_destroy() helper to handle this case > instead of returning the error - as far as the user is concerned, the > size has been set to zero, and the destroy operation has been completed, > even if the kernel indicated an EBUSY. > > Cc: Dan

Re: [RFC 00/10] fs/dax: Fix FS DAX page reference counts

2024-04-12 Thread Dan Williams
Jason Gunthorpe wrote: > On Fri, Apr 12, 2024 at 04:55:31PM +1000, Alistair Popple wrote: > > > Ok, I think I found the dragons you were talking about earlier for > > device-dax. I completely broke that because as you've already pointed > > out pmd_trans_huge() won't filter out DAX pages. That's

Re: [RFC 04/10] fs/dax: Don't track page mapping/index

2024-04-12 Thread Dan Williams
Jan Kara wrote: > On Thu 11-04-24 10:57:25, Alistair Popple wrote: > > The page->mapping and page->index fields are normally used by the > > pagecache and rmap for looking up virtual mappings of pages. FS DAX > > implements it's own kind of page cache and rmap look ups so these > > fields are

RE: [RFC 04/10] fs/dax: Don't track page mapping/index

2024-04-12 Thread Dan Williams
Alistair Popple wrote: > The page->mapping and page->index fields are normally used by the > pagecache and rmap for looking up virtual mappings of pages. FS DAX > implements it's own kind of page cache and rmap look ups so these > fields are unnecessary. They are currently only used to detect >

RE: [RFC 03/10] pci/p2pdma: Don't initialise page refcount to one

2024-04-12 Thread Dan Williams
Alistair Popple wrote: > The reference counts for ZONE_DEVICE private pages should be > initialised by the driver when the page is actually allocated by the > driver allocator, not when they are first created. This is currently > the case for MEMORY_DEVICE_PRIVATE and MEMORY_DEVICE_COHERENT pages

Re: [RFC 00/10] fs/dax: Fix FS DAX page reference counts

2024-04-11 Thread Dan Williams
Jason Gunthorpe wrote: > On Thu, Apr 11, 2024 at 10:28:56AM -0700, Dan Williams wrote: > > Alistair Popple wrote: > > > FS DAX pages have always maintained their own page reference counts > > > without following the normal rules for page reference counting. In > >

Re: [RFC 00/10] fs/dax: Fix FS DAX page reference counts

2024-04-11 Thread Dan Williams
Alistair Popple wrote: > FS DAX pages have always maintained their own page reference counts > without following the normal rules for page reference counting. In > particular pages are considered free when the refcount hits one rather > than zero and refcounts are not added when mapping the page.

Re: [PATCH] ndtest: Convert to platform remove callback returning void

2024-03-29 Thread Dan Williams
will be renamed to .remove(). > > Trivially convert this driver from always returning zero in the remove > callback to the void returning variant. > > Signed-off-by: Uwe Kleine-König Looks good, Reviewed-by: Dan Williams

Re: [ndctl PATCH v11 1/7] libcxl: add interfaces for GET_POISON_LIST mailbox commands

2024-03-18 Thread Dan Williams
Alison Schofield wrote: > On Mon, Mar 18, 2024 at 10:51:13AM -0700, fan wrote: > > On Wed, Mar 13, 2024 at 09:05:17PM -0700, alison.schofi...@intel.com wrote: > > > From: Alison Schofield > > > > > > CXL devices maintain a list of locations that are poisoned or result > > > in poison if the

Re: [ndctl PATCH v11 4/7] cxl/event_trace: add helpers to retrieve tep fields by type

2024-03-15 Thread Dan Williams
alison.schofield@ wrote: > From: Alison Schofield > > Add helpers to extract the value of an event record field given the > field name. This is useful when the user knows the name and format > of the field and simply needs to get it. The helpers also return > the 'type'_MAX of the type when the

Re: [ndctl PATCH v11 6/7] cxl/list: add --media-errors option to cxl list

2024-03-14 Thread Dan Williams
Alison Schofield wrote: > On Fri, Mar 15, 2024 at 10:09:44AM +0900, Wonjae Lee wrote: > > alison.schofi...@intel.com wrote: > > > From: Alison Schofield > > > > > > The --media-errors option to 'cxl list' retrieves poison lists from > > > memory devices supporting the capability and displays the

Re: [ndctl PATCH v10 0/7] Support poison list retrieval

2024-03-07 Thread Dan Williams
Alison Schofield wrote: [..] > > I notice that the ndctl --media-errors records are: > > > > { offset, length } > > > > ...it is not clear to me that "dpa" and "hpa" have much meaning to > > userspace by default. Physical address information is privileged, so if > > these records were { offset,

Re: Barlopass nvdimm as MemoryMode question

2024-03-07 Thread Dan Williams
Jane Chu wrote: > On 3/7/2024 5:42 PM, Jane Chu wrote: > > > On 3/7/2024 4:49 PM, Dan Williams wrote: > > > >> Jane Chu wrote: > >>> Add Joao. > >>> > >>> On 3/7/2024 1:05 PM, Dan Williams wrote: > >>> > >>

Re: Barlopass nvdimm as MemoryMode question

2024-03-07 Thread Dan Williams
Jane Chu wrote: > Add Joao. > > On 3/7/2024 1:05 PM, Dan Williams wrote: > > > Jane Chu wrote: > >> Hi, Dan and Vishal, > >> > >> What kind of NUMAness is visible to the kernel w.r.t. SysRAM region > >> backed by Barlopass nvdimms config

Re: Barlopass nvdimm as MemoryMode question

2024-03-07 Thread Dan Williams
Jane Chu wrote: > Hi, Dan and Vishal, > > What kind of NUMAness is visible to the kernel w.r.t. SysRAM region > backed by Barlopass nvdimms configured in MemoryMode by impctl ? As always, the NUMA description, is a property of the platform not the media type / DIMM. The ACPI HMAT desrcibes the

Re: Question about forcing 'disable-memdev'

2024-03-07 Thread Dan Williams
Jane Chu wrote: > On 2/27/2024 12:28 PM, Dave Jiang wrote: > > > > > On 2/27/24 1:24 PM, Jane Chu wrote: > >> On 2/27/2024 8:40 AM, Dave Jiang wrote: > >> > >>> On 2/26/24 10:32 PM, Cao, Quanquan/曹 全全 wrote: > Hi, Dave > > On the basis of this patch, I conducted some tests and

Re: [ndctl PATCH v10 6/7] cxl/list: add --media-errors option to cxl list

2024-03-06 Thread Dan Williams
ions. > > Include media-errors in the -vvv verbose option. > > Example usage in the Documentation/cxl/cxl-list.txt update. > > Signed-off-by: Alison Schofield Looks good, just the comment on switching from "dpa" + "hpa" to an { offset, length } tuple. Other

Re: [ndctl PATCH v10 5/7] cxl/list: collect and parse media_error records

2024-03-06 Thread Dan Williams
alison.schofield@ wrote: > From: Alison Schofield > > Media_error records are logged as events in the kernel tracing > subsystem. To prepare the media_error records for cxl list, enable > tracing, trigger the poison list read, and parse the generated > cxl_poison events into a json

Re: [ndctl PATCH v10 4/7] cxl/event_trace: add helpers to retrieve tep fields by type

2024-03-06 Thread Dan Williams
alison.schofield@ wrote: > From: Alison Schofield > > Add helpers to extract the value of an event record field given the > field name. This is useful when the user knows the name and format > of the field and simply needs to get it. > > Since this is in preparation for adding a cxl_poison

Re: [ndctl PATCH v10 3/7] cxl/event_trace: add a private context for private parsers

2024-03-06 Thread Dan Williams
alison.schofield@ wrote: > From: Alison Schofield > > CXL event tracing provides helpers to iterate through a trace > buffer and extract events of interest. It offers two parsing > options: a default parser that adds every field of an event to > a json object, and a private parsing option where

Re: [ndctl PATCH v10 2/7] cxl: add an optional pid check to event parsing

2024-03-06 Thread Dan Williams
viewed-by: Jonathan Cameron > Reviewed-by: Dave Jiang Looks good, Reviewed-by: Dan Williams

Re: [ndctl PATCH v10 1/7] libcxl: add interfaces for GET_POISON_LIST mailbox commands

2024-03-06 Thread Dan Williams
; The resulting poison records are logged as kernel trace events > named 'cxl_poison'. > > Signed-off-by: Alison Schofield > Reviewed-by: Dave Jiang Looks good, Reviewed-by: Dan Williams

Re: [ndctl PATCH v10 0/7] Support poison list retrieval

2024-03-06 Thread Dan Williams
alison.schofield@ wrote: > From: Alison Schofield > > Changes since v9: > - Replace the multi-use 'name' var, with multiple descriptive > flavors: memdev_name, region_name, decoder_name (DaveJ) > - Use a static string table for poison source lookup (DaveJ) > - Rebased on latest pending > Link

Re: [PATCH] xfs: drop experimental warning for FSDAX

2024-02-26 Thread Dan Williams
s_super.c > >>> @@ -371,7 +371,6 @@ xfs_setup_dax_always( > >>> return -EINVAL; > >>> } > >>> > >>> - xfs_warn(mp, "DAX enabled. Warning: EXPERIMENTAL, use at your own > >>> risk"); > >>> return 0; Acked-by: Dan Williams

RE: [PATCH v2 1/3] cxl: Change 'struct cxl_memdev_state' *_perf_list to single 'struct cxl_dpa_perf'

2024-01-31 Thread Dan Williams
ing the 'struct cxl_dpa_perf` > lists, convert the list to a single 'struct cxl_dpa_perf' entry in > preparation to move the attributes to statically defined. > > Link: > https://lore.kernel.org/linux-cxl/65b200ba228f_2d43c29...@dwillia2-mobl3.amr.corp.intel.com.notmuch/ > Suggest

Re: [NDCTL PATCH v3 0/3] ndctl: Add support of qos_class for CXL CLI

2024-01-25 Thread Dan Williams
Dave Jiang wrote: [..] > > This needs changes to test/cxl-topology.sh to validate that the > > qos_class file pops in the right place per and has prepopulated values > > per cxl_test expectation. > > Do we need to plumb cxl_test to support qos_class with mock functions? > Currently cxl_test does

RE: [NDCTL PATCH v3 0/3] ndctl: Add support of qos_class for CXL CLI

2024-01-25 Thread Dan Williams
Dave Jiang wrote: > Hi Vishal, > With the QoS class series merged to the v6.8 kernel, can you please review and > apply this series to ndctl if acceptable? > > v3: > - Rebase against latest ndctl/pending branch. > > The series adds support for the kernel enabling of QoS class in the v6.8 >

RE: [PATCH] fsdax: cleanup tracepoints

2024-01-18 Thread Dan Williams
Shiyang Ruan wrote: > Restore the tracepoint that was accidentally deleted before, and rename > to dax_insert_entry(). Also, since we are using XArray, rename > 'radix_entry' to 'xa_entry'. The restore tracepoint patch should be an independent patch. As for the rename I believe that can

Re: [ndctl PATCH v6 0/7] Support poison list retrieval

2024-01-18 Thread Dan Williams
Alison Schofield wrote: [..] > > > "dpa":1073741824, > > > "dpa_length":64, > > > > The dpa_length is also the hpa_length, right? So maybe just call the > > field "length". > > > > No, the length only refers to the device address space. I don't think > the hpa is guaranteed to

Re: [ndctl PATCH v6 0/7] Support poison list retrieval

2024-01-18 Thread Dan Williams
alison.schofield@ wrote: > From: Alison Schofield > > Changes since v5: > - Use a private parser for cxl_poison events. (Dan) > Previously used the default parser and re-parsed per the cxl-list > needs. Replace that with a private parsing method for cxl_poison. > - Add a private context to

RE: [PATCH v2] daxctl: Remove unused memory_zone and mem_zone

2024-01-17 Thread Dan Williams
Xiao Yang wrote: > The enum memory_zone definition and mem_zone variable > have never been used so remove them. > > Signed-off-by: Xiao Yang Looks good to me: Reviewed-by: Dan Williams

RE: [NDCTL PATCH 2/2] daxctl: Force to offline memory by param.force

2024-01-16 Thread Dan Williams
Xiao Yang wrote: > Try to make daxctl reconfigure-device with system-ram mode > offline memory when both param.no_online and param.force > are set but daxctl_dev_will_auto_online_memory returns true. So is the goal here to try to save some steps in the case where the kernel already onlined the

RE: [NDCTL PATCH 1/2] daxctl: Don't check param.no_movable when param.no_online is set

2024-01-16 Thread Dan Williams
Hey, apologies for the delay here, and appreciate the pings. Xiao Yang wrote: > param.no_movable is used to online memory in ZONE_NORMAL but > param.no_online is used to not online memory. So it's unnecessary > to check param.no_movable when param.no_online is set. > > Signed-off-by: Xiao Yang

[PATCH] tools/testing/nvdimm: Disable "missing prototypes / declarations" warnings

2024-01-16 Thread Dan Williams
n addition to expanding in-tree coverage, also impacts out-of-tree module builds like those in tools/testing/nvdimm/. Filter out the warning options on unit test code that does not effect mainline builds. Signed-off-by: Dan Williams --- tools/testing/nvdimm/Kbuild |2 ++ 1 file changed, 2

[PATCH] tools/testing/cxl: Disable "missing prototypes / declarations" warnings

2024-01-16 Thread Dan Williams
ng in-tree coverage, also impacts out-of-tree module builds like those in tools/testing/cxl/. Filter out the warning options on unit test code that does not effect mainline builds. Signed-off-by: Dan Williams --- tools/testing/cxl/Kbuild |2 ++ tools/testing/cxl/test/Kbuild |2 +

RE: [PATCH ndctl v2] test/daxctl-create.sh: remove region and dax device assumptions

2024-01-11 Thread Dan Williams
quot;* ]]; then > + region_id="$("$DAXCTL" list -R | jq -r '.[] | select(.path | > contains("hmem")) | .id')" > + if [[ ! "$region_id" ]]; then /me learned a new bash'ism for testing empty variables, I like that better than [ -z $region_id ] Reviewed-by: Dan Williams

RE: [PATCH ndctl] test/daxctl-create.sh: remove region and dax device assumptions

2024-01-11 Thread Dan Williams
CXL however, the region > numbering namespace is shared with CXL regions, often pushing the > efi_fake_mem region to something other than 'region0'. > > Remove any region and device number assumptions from this test so it > works regardless of how regions get enumerated. >

[PATCH] acpi/nfit: Use sysfs_emit() for all attributes

2023-12-19 Thread Dan Williams
Schofield Cc: Dave Jiang Signed-off-by: Dan Williams --- drivers/acpi/nfit/core.c | 44 ++-- 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/drivers/acpi/nfit/core.c b/drivers/acpi/nfit/core.c index 992385537757..9f44156c6181 100644

RE: [ndctl PATCH v2 2/2] test/cxl-region-sysfs.sh: Fix cxl-region-sysfs.sh: line 107: [: missing `]'

2023-12-12 Thread Dan Williams
Li Zhijian wrote: > A space is missing before ']' > > Acked-by: Dan Williams You added my Ack without addressing the feedback. "Commentary on the impact of the change is always welcome." Please include a sentence on how this triggered for you and some analysis of the why i

Re: [ndctl PATCH v5 3/5] cxl/list: collect and parse the poison list records

2023-12-06 Thread Dan Williams
alison.schofield@ wrote: > From: Alison Schofield > > Poison list records are logged as events in the kernel tracing > subsystem. To prepare the poison list for cxl list, enable tracing, > trigger the poison list read, and parse the generated cxl_poison > events into a json representation. > >

Re: [ndctl PATCH v5 4/5] cxl/list: add --poison option to cxl list

2023-12-06 Thread Dan Williams
alison.schofield@ wrote: > From: Alison Schofield > > The --poison option to 'cxl list' retrieves poison lists from > memory devices supporting the capability and displays the > returned poison records in the cxl list json. This option can > apply to memdevs or regions. > > Example usage in the

[PATCH] tools/testing/nvdimm: Add compile-test coverage for ndtest

2023-12-06 Thread Dan Williams
Jiang Cc: Ira Weiny Signed-off-by: Dan Williams --- tools/testing/nvdimm/test/Kbuild |1 + 1 file changed, 1 insertion(+) diff --git a/tools/testing/nvdimm/test/Kbuild b/tools/testing/nvdimm/test/Kbuild index 197bcb2b7f35..003d48f5f24f 100644 --- a/tools/testing/nvdimm/test/Kbuild +

RE: [ndctl PATCH 3/3] test/cxl-region-sysfs.sh: Fix cxl-region-sysfs.sh: line 107: [: missing `]'

2023-12-06 Thread Dan Williams
Li Zhijian wrote: > Signed-off-by: Li Zhijian Please no patches with empty changelogs. Commentary on the impact of the change is always welcome. Otherwise change looks good to me, and I wonder why this error is only triggering now? Acked-by: Dan Williams > --- > test/cxl-region-sys

RE: [ndctl PATCH 2/3] test/cxl-region-sysfs.sh: use operator '!=' to compare hexadecimal value

2023-12-06 Thread Dan Williams
Li Zhijian wrote: > Fix errors: > line 111: [: 0x8000: integer expression expected > line 112: [: 0x3ff11000: integer expression expected > line 141: [: 0x8000: integer expression expected > line 143: [: 0x3ff11000: integer expression expected Similar commentary on how found and

RE: [ndctl PATCH 1/3] test/cxl-region-sysfs.sh: covert size and resource to hex before test

2023-12-06 Thread Dan Williams
I would summarize this as "Fix hex vs decimal confusion" Li Zhijian wrote: > size and resource are both decimal Please always describe the "why" in the changelog including the motivation for the change and the effect of not applying the patch. I.e. how would someone know that they are hitting

Re: [NDCTL PATCH v2] cxl/region: Add -f option for disable-region

2023-10-30 Thread Dan Williams
Dave Jiang wrote: [..] > Ah that was a mistake. I meant to call the query function and not the > online op function. Do you have any objections to > > if (!daxctl_memory_is_movable(mem)) Wait, why check for movable? ZONE_NORMAL can be removed if you are lucky, and ZONE_MOVABLE may still not be

RE: [PATCH v15] mm, pmem, xfs: Introduce MF_MEM_PRE_REMOVE for unbind

2023-09-29 Thread Dan Williams
correctly. Also drop the cache of associated files before > pmem is removed. > > [1]: > https://lore.kernel.org/linux-mm/161604050314.1463742.14151665140035795571.st...@dwillia2-desk3.amr.corp.intel.com/ > [2]: > https://lore.kernel.org/linux-xfs/169116275623.3187159.16862410128731457358.stg-ugh@frogsfrogsfrogs/ > > Signed-off-by: Shiyang Ruan > Reviewed-by: Darrick J. Wong > Acked-by: Dan Williams This version address my feedback you can upgrade that Acked-by: to Reviewed-by: Dan Williams

Re: [PATCH] xfs: drop experimental warning for FSDAX

2023-09-29 Thread Dan Williams
Eric Sandeen wrote: > On 9/29/23 9:17 AM, Chandan Babu R wrote: > > On Thu, Sep 28, 2023 at 09:20:52 AM -0700, Andrew Morton wrote: > >> On Thu, 28 Sep 2023 16:44:00 +0800 Shiyang Ruan > >> wrote: > >> > >>> But please pick the following patch[1] as well, which fixes failures of > >>>

Re: [PATCH] xfs: drop experimental warning for FSDAX

2023-09-29 Thread Dan Williams
Shiyang Ruan wrote: > > > 在 2023/9/29 1:13, Darrick J. Wong 写道: > > On Thu, Sep 28, 2023 at 09:20:52AM -0700, Andrew Morton wrote: > >> On Thu, 28 Sep 2023 16:44:00 +0800 Shiyang Ruan > >> wrote: > >> > >>> But please pick the following patch[1] as well, which fixes failures of > >>>

RE: [PATCH v14] mm, pmem, xfs: Introduce MF_MEM_PRE_REMOVE for unbind

2023-09-27 Thread Dan Williams
Also drop the cache of associated files before > pmem is removed. > > [1]: > https://lore.kernel.org/linux-mm/161604050314.1463742.14151665140035795571.st...@dwillia2-desk3.amr.corp.intel.com/ > [2]: > https://lore.kernel.org/linux-xfs/169116275623.3187159.1686241012873145

RE: [ndctl RFC 1/1] cxl: Script to manage regions during CXL device hotplug remove-reinsert

2023-08-07 Thread Dan Williams
Terry Bowman wrote: > Hotplug removing a CXL device and hotplug reinserting the same device > currently requires manual interaction for managing the device > region. The CXL device region must be manually destroyed before > hotplug removal and manually created after hotplug reinsertion. > >

RE: [ndctl RFC 0/1] cxl: Script to manage regions during CXL device hotplug remove-reinsert

2023-08-07 Thread Dan Williams
Terry Bowman wrote: > This patch is a script providing region deletion-creation management > required during hotplug remove-insert. It allows a user to hotplug > remove and reinsert a CXL device without requiring the user to make > additional tool calls to destroy-create the region. The tool will

RE: [PATCH v12 2/2] mm, pmem, xfs: Introduce MF_MEM_REMOVE for unbind

2023-08-07 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 > on it to unmap all files in use, and notify processes who are using > those

Re: [PATCH 3/4] dax: Introduce alloc_dev_dax_id()

2023-06-15 Thread Dan Williams
Ira Weiny wrote: > Dan Williams wrote: > > The reference counting of dax_region objects is needlessly complicated, > > has lead to confusion [1], and has hidden a bug [2]. Towards cleaning up > > that mess introduce alloc_dev_dax_id() to minimize the holding of a > > d

Re: [PATCH] tools/testing/nvdimm: Drop empty platform remove function

2023-06-06 Thread Dan Williams
Uwe Kleine-König wrote: > Hello Dan, > > On Tue, May 09, 2023 at 07:55:46AM +0200, Uwe Kleine-König wrote: > > On Tue, Dec 13, 2022 at 11:09:23AM -0800, Dan Williams wrote: > > > Uwe Kleine-König wrote: > > > > A remove callback just returning 0 is equivalent

[PATCH 4/4] dax: Cleanup extra dax_region references

2023-06-03 Thread Dan Williams
Now that free_dev_dax_id() internally manages the references it needs the extra references taken by the dax_region drivers are not needed. Reported-by: Ira Weiny Signed-off-by: Dan Williams --- drivers/dax/bus.c |4 +--- drivers/dax/bus.h |1 - drivers/dax/cxl.c

[PATCH 3/4] dax: Introduce alloc_dev_dax_id()

2023-06-03 Thread Dan Williams
uce 'seed' devices") Link: http://lore.kernel.org/r/20221203095858.612027-1-liuyongqian...@huawei.com [1] Link: http://lore.kernel.org/r/3cf0890b-4eb0-e70e-cd9c-2ecc3d496...@hpe.com [2] Reported-by: Yongqiang Liu Reported-by: Paul Cassella Reported-by: Ira Weiny Signed-off-by: Dan Williams

[PATCH 2/4] dax: Use device_unregister() in unregister_dax_mapping()

2023-06-03 Thread Dan Williams
Replace an open-coded device_unregister() sequence with the helper. Signed-off-by: Dan Williams --- drivers/dax/bus.c |3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/dax/bus.c b/drivers/dax/bus.c index aee695f86b44..c99ea08aafc3 100644 --- a/drivers/dax/bus.c

[PATCH 1/4] dax: Fix dax_mapping_release() use after free

2023-06-03 Thread Dan Williams
callback. Arrange for a dax_mapping to pin its parent dev_dax instance until dax_mapping_release(). Fixes: 0b07ce872a9e ("device-dax: introduce 'mapping' devices") Signed-off-by: Dan Williams --- drivers/dax/bus.c |5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git

[PATCH 0/4] dax: Fix use after free and other cleanups

2023-06-03 Thread Dan Williams
of that up. Thanks to Yongqiang, Paul, and Ira for their analysis. [1]: http://lore.kernel.org/r/20221203095858.612027-1-liuyongqian...@huawei.com [2]: http://lore.kernel.org/r/3cf0890b-4eb0-e70e-cd9c-2ecc3d496...@hpe.com --- Dan Williams (4): dax: Fix dax_mapping_release() use after free

Re: [PATCH 1/1] pmem: allow user to set QUEUE_FLAG_NOWAIT

2023-05-15 Thread Dan Williams
Jane Chu wrote: > Hi, > > Does it make sense to mark this patch a candidate for stable branch? These numbers: > * linux-block (for-next) # grep slat pmem*fio | column -t > nowait-off-1.fio: slat (nsec): min=431, max=50423k, avg=9424.06 > nowait-off-2.fio: slat (nsec): min=420,

RE: [PATCH 1/1] pmem: allow user to set QUEUE_FLAG_NOWAIT

2023-05-12 Thread Dan Williams
Chaitanya Kulkarni wrote: > Allow user to set the QUEUE_FLAG_NOWAIT optionally using module > parameter to retain the default behaviour. Also, update respective > allocation flags in the write path. Following are the performance > numbers with io_uring fio engine for random read, note that device

RE: [PATCH ndctl] ndctl/namespace.c: fix unchecked return value from uuid_parse()

2023-05-02 Thread Dan Williams
Vishal Verma wrote: > Static analysis reports that write_pfn_sb() neglects to check the return > value from uuid_parse as is done elsewhere. Since the uuid being parsed > comes from the user, check for failure, and return an EINVAL if so. Looks good to me, you can add: Reviewed-by: Dan Williams

[PATCH 4/4] test: Fix dangling pointer warning

2023-04-24 Thread Dan Williams
not escape the function. Signed-off-by: Dan Williams --- test/libndctl.c |4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/test/libndctl.c b/test/libndctl.c index 51245cf4ea98..858110c4dbc1 100644 --- a/test/libndctl.c +++ b/test/libndctl.c @@ -2322,7 +2322,8 @@ static int

[PATCH 3/4] test: Support test modules located in 'updates' instead of 'extra'

2023-04-24 Thread Dan Williams
or modules that ship in their native directory. Signed-off-by: Dan Williams --- test/core.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/core.c b/test/core.c index 5d1aa23723f1..a354f41dcba0 100644 --- a/test/core.c +++ b/test/core.c @@ -209,7 +209,

[PATCH 2/4] cxl/list: Filter root decoders by region

2023-04-24 Thread Dan Williams
t;max_available_extent":"512.00 MiB (536.87 MB)", "volatile_capable":true, "nr_targets":1 }, { "decoder":"decoder3.5", "resource":"0xf1d000", "size":"256.00

[PATCH 1/4] cxl/list: Fix filtering RCDs

2023-04-24 Thread Dan Williams
"endpoint":"endpoint22", "host":"mem11", "depth":1, "memdev":{ "memdev":"mem11", "ram_size":"2.00 GiB (2.15 GB)", "serial":&

[ndctl PATCH 0/4] cxl list and test fixes

2023-04-24 Thread Dan Williams
warning with latest compilers. --- Dan Williams (4): cxl/list: Fix filtering RCDs cxl/list: Filter root decoders by region test: Support test modules located in 'updates' instead of 'extra' test: Fix dangling pointer warning cxl/filter.c |6 ++ cxl/lib/libcxl.c

RE: a more descriptive msg/running without root privileges

2023-04-21 Thread Dan Williams
Joel C. Chang wrote: > When using daxctl, we don't get a hint/suggestion to use sudo/root. > For example, running "daxctl reconfigure-device -m system-ram dax0.0" > without sudo will only print the following: > > libdaxctl: daxctl_dev_disable: dax0.0: failed to disable > dax0.0: disable failed:

Re: [PATCH v11 2/2] mm, pmem, xfs: Introduce MF_MEM_REMOVE for unbind

2023-04-04 Thread Dan Williams
Darrick J. Wong wrote: > On Tue, Mar 28, 2023 at 09:41:46AM +, 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

RE: Determining if optane memory is installed

2023-03-22 Thread Dan Williams
Ian Rogers wrote: > Hi nvdimm@, > > In the perf tool there are metrics for platforms like cascade lake > where we're collecting data for optane memory [1] but if optane memory > isn't installed then the counters will always read 0. Is there a > relatively simple way of determining if Optane

RE: [PATCH ndctl] ndctl.spec.in: Add build dependencies for libtraceevent and libtracefs

2023-02-22 Thread Dan Williams
"cxl: add a helper to parse trace events into a json > object") > Fixes: 7b237bc7a8ae ("cxl: add a helper to go through all current events and > parse them") > Cc: Dave Jiang > Signed-off-by: Vishal Verma Looks good to me, Reviewed-by: Dan Williams

Re: [PATCH ndctl 3/3] test/cxl-security.sh: avoid intermittent failures due to sasync probe

2023-02-21 Thread Dan Williams
Alison Schofield wrote: > On Fri, Feb 17, 2023 at 05:40:24PM -0700, Vishal Verma wrote: > > This test failed intermittently because the ndctl-list operation right > > after a 'modprobe cxl_test' could race the actual nmem devices getting > > loaded. > > > > Since CXL device probes are

Re: [ndctl PATCH] daxctl: Skip over memory failure node status

2023-02-14 Thread Dan Williams
Adam Manzanares wrote: > On Mon, Feb 13, 2023 at 03:26:58PM -0800, Dan Williams wrote: > > Adam Manzanares wrote: > > > When trying to match a dax device to a memblock physical address > > > memblock_in_dev will fail if the the phys_index sysfs file does > > >

[PATCH] cxl/pmem: Fix nvdimm registration races

2023-02-14 Thread Dan Williams
PROBE_PREFER_ASYNCHRONOUS. So provide for a synchronous registration path to preclude this scenario. Fixes: 21083f51521f ("cxl/pmem: Register 'pmem' / cxl_nvdimm devices") Cc: Reported-by: Dave Jiang Tested-by: Dave Jiang Signed-off-by: Dan Williams --- drivers/cxl/pmem.c |1

RE: [ndctl PATCH] daxctl: Skip over memory failure node status

2023-02-13 Thread Dan Williams
Adam Manzanares wrote: > When trying to match a dax device to a memblock physical address > memblock_in_dev will fail if the the phys_index sysfs file does > not exist in the memblock. Currently the memory failure directory > associated with a node is currently interpreted as a memblock. > Skip

Re: [PATCH ndctl v2 0/7] cxl: add support for listing and creating volatile regions

2023-02-13 Thread Dan Williams
Brice Goglin wrote: > Le 11/02/2023 à 02:53, Dan Williams a écrit : > > > Brice Goglin wrote: > > [..] > >>>> By the way, once configured in system ram, my CXL ram is merged into an > >>>> existing "normal" NUMA node. How do I tell Qemu

Re: [PATCH ndctl v2 0/7] cxl: add support for listing and creating volatile regions

2023-02-10 Thread Dan Williams
Brice Goglin wrote: [..] > >> By the way, once configured in system ram, my CXL ram is merged into an > >> existing "normal" NUMA node. How do I tell Qemu that a CXL region should > >> be part of a new NUMA node? I assume that's what's going to happen on > >> real hardware? > > We don't yet have

RE: [PATCH ndctl 7/7] cxl/list: Enumerate device-dax properties for regions

2023-02-07 Thread Dan Williams
Vishal Verma wrote: > From: Dan Williams > > Recently the kernel added support for routing newly mapped CXL regions to > device-dax. Include the json representation of a DAX region beneath its > host CXL region. > > Signed-off-by: Dan Williams > [vishal: fix missi

RE: [PATCH ndctl 5/7] cxl/region: determine region type based on root decoder capability

2023-02-07 Thread Dan Williams
pe from this without requiring it to be specified explicitly. > > Cc: Dan Williams > Signed-off-by: Vishal Verma > --- > Documentation/cxl/cxl-create-region.txt | 3 ++- > cxl/region.c| 27 +++ > 2 files changed, 29 insertions(+), 1

RE: [PATCH ndctl 4/7] cxl/region: accept user-supplied UUIDs for pmem regions

2023-02-07 Thread Dan Williams
pplied UUIDs, even though the man page for cxl-create-region > advertised the option. > > Fix this by actually adding this option now, and add checks to validate > the user-supplied UUID, and refuse it for ram regions. > > Cc: Dan Williams > Signed-off-by: Vishal Verma > --- Looks good, Reviewed-by: Dan Williams

RE: [PATCH ndctl 3/7] cxl: add core plumbing for creation of ram regions

2023-02-07 Thread Dan Williams
t; 1/ Use the above create_ram_region API, and > 2/ Elide setting the UUID, since ram regions don't have one > > Cc: Dan Williams > Signed-off-by: Vishal Verma Looks good, Reviewed-by: Dan Williams

RE: [PATCH ndctl 2/7] cxl: add a type attribute to region listings

2023-02-07 Thread Dan Williams
lder kernels that > lack this, region listings will simply omit emitting this attribute, > but otherwise not treat it as a failure. > > Cc: Dan Williams > Signed-off-by: Vishal Verma > --- > Documentation/cxl/lib/libcxl.txt | 1 + > cxl/lib/private.h

RE: [PATCH ndctl 1/7] cxl/region: skip region_actions for region creation

2023-02-07 Thread Dan Williams
> > Since there's no need to walk through the topology after creating a > region, and especially not to perform an invalid 'action', switch > back to retuening early for create-region. > > Fixes: 3d6cd829ec08 ("cxl/region: Use cxl_filter_walk() to gather > create-region targ

Re: [PATCH] fsdax: dax_unshare_iter() should return a valid length

2023-02-02 Thread Dan Williams
Andrew Morton wrote: > On Thu, 2 Feb 2023 23:01:23 + Matthew Wilcox wrote: > > > On Thu, Feb 02, 2023 at 12:33:47PM +, Shiyang Ruan wrote: > > > The copy_mc_to_kernel() will return 0 if it executed successfully. > > > Then the return value should be set to the length it copied. > > > >

Re: [PATCH] daxctl: Fix memblock enumeration off-by-one

2023-02-02 Thread Dan Williams
Eliot Moss wrote: > On 2/3/2023 7:56 AM, Dan Williams wrote: > > A memblock is an inclusive memory range. Bound the search by the last > > address in the memory block. > > > > Found by wondering why an offline 32-block (at 128MB == 4GB) range was > > repo

[PATCH] daxctl: Fix memblock enumeration off-by-one

2023-02-02 Thread Dan Williams
A memblock is an inclusive memory range. Bound the search by the last address in the memory block. Found by wondering why an offline 32-block (at 128MB == 4GB) range was reported as 33 blocks with one online. Signed-off-by: Dan Williams --- daxctl/lib/libdaxctl.c |2 +- 1 file changed, 1

RE: nvdimm fsdax metadata

2023-01-05 Thread Dan Williams
Eliot Moss wrote: > The configuration guidance for nvdimm indicates that fsdax mode requires 64 > byte of metadata per 4K bytes of nvdimm. The map= command line argument can > be used to control whether that metadata is stored in the nvdimm or regular > (presumably DRAM) memory. We were

RE: [ndctl PATCH v2 07/18] cxl/list: Add parent_dport attribute to port listings

2022-12-16 Thread Dan Williams
Dan Williams wrote: > > --- > cxl/json.c |8 > cxl/lib/libcxl.c | 38 ++ > cxl/lib/libcxl.sym |1 + > cxl/lib/private.h |2 ++ > cxl/libcxl.h |1 + > 5 files changed, 50 insertions(+) I shoul

Re: [ndctl PATCH v3 1/4] ndctl: add CXL bus detection

2022-12-16 Thread Dan Williams
+12,7 @@ > > #include > > #include > > #include > > +#include > > Of course I missed removing this change. With this fixed up feel free to add: Reviewed-by: Dan Williams ...for the series.

Re: [ndctl PATCH v2 1/4] ndctl: add CXL bus detection

2022-12-15 Thread Dan Williams
Jeff Moyer wrote: > Dan Williams writes: > > > Dave Jiang wrote: > >> Add a CXL bus type, and detect whether a 'dimm' is backed by the CXL > >> subsystem. > >> > >> Reviewed-by: Alison Schofield > >> Signed-off-by: Dave Jiang &

RE: [ndctl PATCH v2 1/4] ndctl: add CXL bus detection

2022-12-15 Thread Dan Williams
Dave Jiang wrote: > Add a CXL bus type, and detect whether a 'dimm' is backed by the CXL > subsystem. > > Reviewed-by: Alison Schofield > Signed-off-by: Dave Jiang > > --- > v2: > - Improve commit log. (Vishal) > --- > ndctl/lib/libndctl.c | 53 >

RE: [PATCH 4/4] ndctl/test: Add CXL test for security

2022-12-13 Thread Dan Williams
Dave Jiang wrote: > Create security-cxl.sh based off of security.sh for nfit security testing. > The test will test a cxl_test based security commands enabling through > nvdimm. > > Signed-off-by: Dave Jiang > --- > test/common |7 + > test/meson.build |7 + >

RE: [PATCH] tools/testing/nvdimm: Drop empty platform remove function

2022-12-13 Thread Dan Williams
Uwe Kleine-König wrote: > A remove callback just returning 0 is equivalent to no remove callback > at all. So drop the useless function. Looks good, applied to my for-6.3/misc branch for now.

RE: [PATCH] dax/hmem: Drop empty platform remove function

2022-12-12 Thread Dan Williams
Uwe Kleine-König wrote: > A remove callback just returning 0 is equivalent to no remove callback > at all. So drop the useless function. Looks good, applied.

Re: [ndctl PATCH v2 15/18] cxl/Documentation: Fix whitespace typos in create-region man page

2022-12-09 Thread Dan Williams
Alison Schofield wrote: > On Thu, Dec 08, 2022 at 01:29:26PM -0800, Dan Williams wrote: > > Missing SOB and commit log Whoops, moved too fast and broke things. Vishal, feel free to add: --- The 'create-region' man page had some typos when it was first created. Clean them up p

  1   2   3   4   5   6   7   8   9   10   >