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

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

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

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

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

2022-07-28 Thread Dan Williams
Jane Chu wrote: > On 7/27/2022 1:01 PM, Dan Williams wrote: > > Jane Chu wrote: > >> On 7/27/2022 12:30 PM, Jane Chu wrote: > >>> On 7/27/2022 12:24 PM, Jane Chu wrote: > >>>> On 7/27/2022 11:56 AM, Dan Williams wrote: > >>>>> Jane

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

2022-07-27 Thread Dan Williams
Jane Chu wrote: > On 7/27/2022 12:30 PM, Jane Chu wrote: > > On 7/27/2022 12:24 PM, Jane Chu wrote: > >> On 7/27/2022 11:56 AM, Dan Williams wrote: > >>> Jane Chu wrote: > >>>> With Commit 7917f9cdb503 ("acpi/nfit: rely on mce->misc

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

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

Re: [PATCH] fsdax: Fix infinite loop in dax_iomap_rw()

2022-07-25 Thread Dan Williams
Darrick J. Wong wrote: > On Mon, Jul 25, 2022 at 11:20:50AM +0800, Li Jinlin wrote: > > I got an infinite loop and a WARNING report when executing a tail command > > in virtiofs. > > > > WARNING: CPU: 10 PID: 964 at fs/iomap/iter.c:34 iomap_iter+0x3a2/0x3d0 > > Modules linked in: > > CPU:

Re: [PATCH] mm: fix missing wake-up event for FSDAX pages

2022-07-21 Thread Dan Williams
Jason Gunthorpe wrote: > On Mon, Jul 11, 2022 at 07:39:17PM -0700, Dan Williams wrote: > > Muchun Song wrote: > > > On Mon, Jul 04, 2022 at 11:38:16AM +0100, Matthew Wilcox wrote: > > > > On Mon, Jul 04, 2022 at 03:40:54PM +0800, Muchun Song wrote: > > &g

Re: [RFC PATCH v6] mm, pmem, xfs: Introduce MF_MEM_REMOVE for unbind

2022-07-18 Thread Dan Williams
Darrick J. Wong wrote: > On Thu, Jul 14, 2022 at 11:21:44AM -0700, Dan Williams wrote: > > ruansy.f...@fujitsu.com wrote: > > > This patch is inspired by Dan's "mm, dax, pmem: Introduce > > > dev_pagemap_failure()"[1]. With the help of dax_holder and > &g

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

2022-07-18 Thread Dan Williams
Luck, Tony wrote: > +m.misc = (MCI_MISC_ADDR_PHYS << 6) | __ffs64(mem_err->physical_addr_mask); > > Do we want to unconditionally trust the sanity of the BIOS provided > physical_address_mask? > > There's a warning comment on the kernel __ffs64() function: > > * The result is not defined if

RE: [PATCH v2] x86/mce: retrieve poison range from hardware whenever supported

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

Re: [PATCH] acpi/nfit: badrange report spill over to clean range

2022-07-15 Thread Dan Williams
[ add Tony ] Jane Chu wrote: > On 7/14/2022 6:19 PM, Dan Williams wrote: > > Jane Chu wrote: > >> I meant to say there would be 8 calls to the nfit_handle_mce() callback, > >> one call for each poison with accurate address. > >> > >> Also, short A

Re: [PATCH] acpi/nfit: badrange report spill over to clean range

2022-07-14 Thread Dan Williams
Jane Chu wrote: > I meant to say there would be 8 calls to the nfit_handle_mce() callback, > one call for each poison with accurate address. > > Also, short ARS would find 2 poisons. > > I attached the console output, my annotation is prefixed with "<==". [29078.634817] {4}[Hardware Error]:

Re: [PATCH] acpi/nfit: badrange report spill over to clean range

2022-07-14 Thread Dan Williams
Jane Chu wrote: > On 7/13/2022 5:24 PM, Dan Williams wrote: > > Jane Chu wrote: > >> On 7/12/2022 5:48 PM, Dan Williams wrote: > >>> Jane Chu wrote: > >>>> Commit 7917f9cdb503 ("acpi/nfit: rely on mce->misc to determine poison > >>

Re: [PATCH v1 1/1] nvdimm/namespace: return uuid_null only once in nd_dev_to_uuid()

2022-07-14 Thread Dan Williams
Andy Shevchenko wrote: > On Thu, Jul 14, 2022 at 11:24:05AM -0700, Dan Williams wrote: > > Andy Shevchenko wrote: > > > Refactor nd_dev_to_uuid() in order to make code shorter and cleaner > > > by joining conditions and hence returning uuid_null only once. > > >

RE: [PATCH v1 1/1] nvdimm/namespace: drop nested variable in create_namespace_pmem()

2022-07-14 Thread Dan Williams
Andy Shevchenko wrote: > Kernel build bot reported: > > namespace_devs.c:1991:10: warning: Local variable 'uuid' shadows outer > variable [shadowVariable] > > Refactor create_namespace_pmem() by dropping a nested version of > the same variable. Applied for 5.19-rc. Thanks!

RE: [PATCH v1 1/1] nvdimm/namespace: drop unneeded temporary variable in size_store()

2022-07-14 Thread Dan Williams
Andy Shevchenko wrote: > Refactor size_store() in order to remove temporary variable on stack > by joining conditionals. Looks good, applied.

RE: [PATCH v1 1/1] nvdimm/namespace: return uuid_null only once in nd_dev_to_uuid()

2022-07-14 Thread Dan Williams
Andy Shevchenko wrote: > Refactor nd_dev_to_uuid() in order to make code shorter and cleaner > by joining conditions and hence returning uuid_null only once. Apologies for the delay, applied for v5.20.

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

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

Re: [PATCH] acpi/nfit: badrange report spill over to clean range

2022-07-13 Thread Dan Williams
Jane Chu wrote: > On 7/12/2022 5:48 PM, Dan Williams wrote: > > Jane Chu wrote: > >> Commit 7917f9cdb503 ("acpi/nfit: rely on mce->misc to determine poison > >> granularity") changed nfit_handle_mce() callback to report badrange for > >&

RE: [PATCH v2] pmem: fix a name collision

2022-07-12 Thread Dan Williams
Jane Chu wrote: > Kernel test robot detected name collision when compiled on 'um' > architecture. Rename "to_phys()" to "pmem_to_phys()". > > >> drivers/nvdimm/pmem.c:48:20: error: conflicting types for 'to_phys'; have > >> 'phys_addr_t(struct pmem_device *, phys_addr_t)' {aka 'long long

RE: [PATCH] acpi/nfit: badrange report spill over to clean range

2022-07-12 Thread Dan Williams
Jane Chu wrote: > Commit 7917f9cdb503 ("acpi/nfit: rely on mce->misc to determine poison > granularity") changed nfit_handle_mce() callback to report badrange for > each poison at an alignment indicated by 1ULL << MCI_MISC_ADDR_LSB(mce->misc) > instead of the hardcoded L1_CACHE_BYTES. However

Re: [PATCH] mm: fix missing wake-up event for FSDAX pages

2022-07-11 Thread Dan Williams
Muchun Song wrote: > On Mon, Jul 04, 2022 at 11:38:16AM +0100, Matthew Wilcox wrote: > > On Mon, Jul 04, 2022 at 03:40:54PM +0800, Muchun Song wrote: > > > FSDAX page refcounts are 1-based, rather than 0-based: if refcount is > > > 1, then the page is freed. The FSDAX pages can be pinned through

RE: [PATCH v4 26/34] tools/testing/nvdimm: Convert to printbuf

2022-06-24 Thread Dan Williams
[ add Santosh ] Kent Overstreet wrote: > This converts from seq_buf to printbuf. Here we're using printbuf with > an external buffer, meaning it's a direct conversion. > > Signed-off-by: Kent Overstreet > Cc: Dan Williams > Cc: Dave Hansen > Cc: nvd...@lists.linux.dev A

RE: [RFC][PATCH] fix short copy handling in copy_mc_pipe_to_iter()

2022-06-16 Thread Dan Williams
g it will allow us to avoid an ugly kludge in fs/splice.c. > We could put it into lib/iov_iter.c for now and move it later, > but I don't see the point going that way... Apologies for the delay in responding (reworking my email workflow after a loss of Gmail access for my intel.com address)

[GIT PULL] LIBNVDIMM and DAX for 5.19

2022-05-27 Thread Dan Williams
(2) on DAX - Fix 'security overwrite' support in the presence of media errors - Miscellaneous cleanups and fixes for nfit_test (nvdimm unit tests) Dan Williams (1): nvdimm: Allow overwrite in the presence of disabled dimms

[PATCH v10 3/7] mce: fix set_mce_nospec to always unmap the whole page

2022-05-16 Thread Dan Williams
so fix pmem_do_write(). Fixes: 284ce4011ba6 ("x86/memory_failure: Introduce {set, clear}_mce_nospec()") Reviewed-by: Christoph Hellwig Reviewed-by: Dan Williams Signed-off-by: Jane Chu Acked-by: Tony Luck Link: https://lore.kernel.org/r/2022044508.440670-4-jane....@oracle.c

[PATCH v11 2/7] x86/mce: relocate set{clear}_mce_nospec() functions

2022-05-16 Thread Dan Williams
From: Jane Chu Relocate the twin mce functions to arch/x86/mm/pat/set_memory.c file where they belong. While at it, fixup a function name in a comment. Reviewed-by: Christoph Hellwig Reviewed-by: Dan Williams Signed-off-by: Jane Chu Acked-by: Borislav Petkov Cc: Stephen Rothwell [sfr

[PATCH v10 7/7] pmem: implement pmem_recovery_write()

2022-05-13 Thread Dan Williams
recovery write threads are already serialized by writer lock held by dax_iomap_rw(). Signed-off-by: Jane Chu Reviewed-by: Christoph Hellwig Signed-off-by: Dan Williams --- Changes since v9: - Fixup compile warnings in debug messages drivers/nvdimm/pmem.c | 87

[PATCH v10 2/7] x86/mce: relocate set{clear}_mce_nospec() functions

2022-05-13 Thread Dan Williams
From: Jane Chu Relocate the twin mce functions to arch/x86/mm/pat/set_memory.c file where they belong. While at it, fixup a function name in a comment. Reviewed-by: Christoph Hellwig Reviewed-by: Dan Williams Signed-off-by: Jane Chu Acked-by: Borislav Petkov Signed-off-by: Dan Williams

Re: [PATCHSETS] v14 fsdax-rmap + v11 fsdax-reflink

2022-05-11 Thread Dan Williams
orton wrote: > > > > On Tue, 10 May 2022 18:55:50 -0700 Dan Williams > > > > wrote: > > > > > > > > > > It'll need to be a stable branch somewhere, but I don't think it > > > > > > really matters where al long as it's merged

Re: [PATCHSETS] v14 fsdax-rmap + v11 fsdax-reflink

2022-05-10 Thread Dan Williams
On Tue, May 10, 2022 at 7:29 PM Andrew Morton wrote: > > On Tue, 10 May 2022 18:55:50 -0700 Dan Williams > wrote: > > > > It'll need to be a stable branch somewhere, but I don't think it > > > really matters where al long as it's merged into the xfs for-next &g

Re: [PATCHSETS] v14 fsdax-rmap + v11 fsdax-reflink

2022-05-10 Thread Dan Williams
[ add Andrew ] On Tue, May 10, 2022 at 6:49 PM Dave Chinner wrote: > > On Tue, May 10, 2022 at 05:03:52PM -0700, Darrick J. Wong wrote: > > On Sun, May 08, 2022 at 10:36:06PM +0800, Shiyang Ruan wrote: > > > This is a combination of two patchsets: > > > 1.fsdax-rmap: > > >

Re: [PATCH] testing: nvdimm: asm/mce.h is not needed in nfit.c

2022-04-29 Thread Dan Williams
On Fri, Apr 29, 2022 at 12:43 AM Michal Suchanek wrote: > > asm/mce.h is not available on arm, and it is not needed to build nfit.c. > Remove the include. > > It was likely needed for COPY_MC_TEST > > Fixes: 3adb776384f2 ("x86, libnvdimm/test: Remove COPY_MC_TEST") > Signed-off-by: Michal

Re: [PATCH] testing: nvdimm: iomap: make __nfit_test_ioremap a macro

2022-04-29 Thread Dan Williams
On Fri, Apr 29, 2022 at 6:41 AM Michal Suchanek wrote: > > The ioremap passed as argument to __nfit_test_ioremap can be a macro so > it cannot be passed as function argument. Make __nfit_test_ioremap into > a macro so that ioremap can be passed as untyped macro argument. > Looks reasonable to me

Re: ndctl tests usable?

2022-04-26 Thread Dan Williams
On Tue, Apr 26, 2022 at 11:10 AM Michal Suchánek wrote: > > On Tue, Apr 26, 2022 at 09:47:19AM -0700, Dan Williams wrote: > > On Tue, Apr 26, 2022 at 9:43 AM Michal Suchánek wrote: > > > > > > On Tue, Apr 26, 2022 at 09:32:24AM -0700, Dan Williams wrote: > >

Re: ndctl tests usable?

2022-04-26 Thread Dan Williams
On Tue, Apr 26, 2022 at 9:43 AM Michal Suchánek wrote: > > On Tue, Apr 26, 2022 at 09:32:24AM -0700, Dan Williams wrote: > > On Tue, Apr 26, 2022 at 9:15 AM Michal Suchánek wrote: > > > > > > On Tue, Apr 26, 2022 at 08:51:25AM -0700, Dan Williams wrote: > >

Re: ndctl tests usable?

2022-04-26 Thread Dan Williams
On Tue, Apr 26, 2022 at 9:15 AM Michal Suchánek wrote: > > On Tue, Apr 26, 2022 at 08:51:25AM -0700, Dan Williams wrote: > > On Tue, Apr 26, 2022 at 5:39 AM Michal Suchánek wrote: > > > > > > Hello, > > > > > > there is some t

Re: ndctl tests usable?

2022-04-26 Thread Dan Williams
On Tue, Apr 26, 2022 at 5:39 AM Michal Suchánek wrote: > > Hello, > > there is some testsuite included with ndctl, and when following the > instructions to build it most tests fail or are skipped: > > [ 95s] Ok: 3 > [ 95s] Expected Fail: 0 > [ 95s] Fail: 5

Re: [PATCH] tools/testing/nvdimm: remove unneeded flush_workqueue

2022-04-25 Thread Dan Williams
On Sat, Apr 23, 2022 at 11:27 PM wrote: > > From: ran jianping > > All work currently pending will be done first by calling destroy_workqueue, > so there is no need to flush it explicitly. > Looks good, applied.

Re: [PATCH v3 2/8] cxl/acpi: Add root device lockdep validation

2022-04-25 Thread Dan Williams
On Mon, Apr 25, 2022 at 9:05 AM Dan Williams wrote: > > On Mon, Apr 25, 2022 at 3:33 AM Peter Zijlstra wrote: > > > > On Sat, Apr 23, 2022 at 10:27:52AM -0700, Dan Williams wrote: > > > > > ...so I'm going to drop it and just add a comment about the > >

Re: [PATCH v3 2/8] cxl/acpi: Add root device lockdep validation

2022-04-25 Thread Dan Williams
On Mon, Apr 25, 2022 at 3:33 AM Peter Zijlstra wrote: > > On Sat, Apr 23, 2022 at 10:27:52AM -0700, Dan Williams wrote: > > > ...so I'm going to drop it and just add a comment about the > > expectations. As Peter said there's already a multitude of ways to > > caus

Re: [PATCH v13 0/7] fsdax: introduce fs query to support reflink

2022-04-23 Thread Dan Williams
On Fri, Apr 22, 2022 at 5:02 PM Dave Chinner wrote: > > On Fri, Apr 22, 2022 at 02:27:32PM -0700, Dan Williams wrote: > > On Thu, Apr 21, 2022 at 12:47 AM Dave Chinner wrote: > > > > > > On Wed, Apr 20, 2022 at 10:54:59PM -0700, Christoph Hellwig wrote: > > &g

Re: [PATCH v3 8/8] nvdimm: Fix firmware activation deadlock scenarios

2022-04-23 Thread Dan Williams
On Fri, Apr 22, 2022 at 9:28 PM Ira Weiny wrote: > > On Thu, Apr 21, 2022 at 08:33:51AM -0700, Dan Williams wrote: > > Lockdep reports the following deadlock scenarios for CXL root device > > power-management, device_prepare(), operations, and device_shutdown() > > o

Re: [PATCH v3 2/8] cxl/acpi: Add root device lockdep validation

2022-04-23 Thread Dan Williams
On Fri, Apr 22, 2022 at 5:08 PM Dan Williams wrote: > > On Fri, Apr 22, 2022 at 4:58 PM Ira Weiny wrote: > > > > On Thu, Apr 21, 2022 at 08:33:18AM -0700, Dan Williams wrote: > > > The CXL "root" device, ACPI0017, is an attach point for coordinati

Re: [PATCH v3 2/8] cxl/acpi: Add root device lockdep validation

2022-04-22 Thread Dan Williams
On Fri, Apr 22, 2022 at 4:58 PM Ira Weiny wrote: > > On Thu, Apr 21, 2022 at 08:33:18AM -0700, Dan Williams wrote: > > The CXL "root" device, ACPI0017, is an attach point for coordinating > > platform level CXL resources and is the parent device for a CXL port >

Re: [PATCH v13 0/7] fsdax: introduce fs query to support reflink

2022-04-22 Thread Dan Williams
On Thu, Apr 21, 2022 at 12:47 AM Dave Chinner wrote: > > On Wed, Apr 20, 2022 at 10:54:59PM -0700, Christoph Hellwig wrote: > > On Thu, Apr 21, 2022 at 02:35:02PM +1000, Dave Chinner wrote: > > > Sure, I'm not a maintainer and just the stand-in patch shepherd for > > > a single release. However,

[PATCH v3 5/8] ACPI: NFIT: Drop nfit_device_lock()

2022-04-21 Thread Dan Williams
The nfit_device_lock() helper was added to provide lockdep coverage for the NFIT driver's usage of device_lock() on the nvdimm_bus object. Now that nvdimm_bus objects have their own lock class this wrapper can be dropped. Cc: Vishal Verma Cc: Dave Jiang Cc: Ira Weiny Signed-off-by: Dan

[PATCH v3 8/8] nvdimm: Fix firmware activation deadlock scenarios

2022-04-21 Thread Dan Williams
complete, and does not need activate_show() to flush the write side, so this lock usage can be deleted in these attributes. Fixes: 48001ea50d17 ("PM, libnvdimm: Add runtime firmware activation support") Signed-off-by: Dan Williams --- drivers/nvdimm/core.c |4 1 file changed

[PATCH v3 0/8] device-core: Enable device_lock() lockdep validation

2022-04-21 Thread Dan Williams
s add local lockdep coverage") [3]: https://lore.kernel.org/r/ylf0dewci8myl...@hirez.programming.kicks-ass.net --- Dan Williams (8): cxl: Replace lockdep_mutex with local lock classes cxl/acpi: Add root device lockdep validation cxl: Drop cxl_device_lock() nvdim

[PATCH v3 1/8] cxl: Replace lockdep_mutex with local lock classes

2022-04-21 Thread Dan Williams
Cc: Boqun Feng Cc: Alison Schofield Cc: Vishal Verma Cc: Ira Weiny Cc: Ben Widawsky Cc: Jonathan Cameron Signed-off-by: Dan Williams --- drivers/cxl/core/memdev.c |3 +++ drivers/cxl/core/pmem.c |6 ++ drivers/cxl/core/port.c | 13 + 3 files changed, 18 insertions(+)

[PATCH v3 7/8] device-core: Kill the lockdep_mutex

2022-04-21 Thread Dan Williams
-Hartman Cc: "Rafael J. Wysocki" Suggested-by: Peter Zijlstra Signed-off-by: Dan Williams --- drivers/base/core.c|3 --- include/linux/device.h |5 - 2 files changed, 8 deletions(-) diff --git a/drivers/base/core.c b/drivers/base/core.c index 3d6430eb0c6a..2eede2ec3

[PATCH v3 6/8] nvdimm: Drop nd_device_lock()

2022-04-21 Thread Dan Williams
Now that all NVDIMM subsystem locking is validated with custom lock classes, there is no need for the custom usage of the lockdep_mutex. Cc: Vishal Verma Cc: Dave Jiang Cc: Ira Weiny Signed-off-by: Dan Williams --- drivers/nvdimm/btt_devs.c | 16 + drivers/nvdimm/bus.c

[PATCH v3 4/8] nvdimm: Replace lockdep_mutex with local lock classes

2022-04-21 Thread Dan Williams
tps://lore.kernel.org/r/ylf0dewci8myl...@hirez.programming.kicks-ass.net [2] Suggested-by: Peter Zijlstra Cc: Vishal Verma Cc: Dave Jiang Cc: Ira Weiny Signed-off-by: Dan Williams --- drivers/nvdimm/btt_devs.c |7 +-- drivers/nvdimm/bus.c| 14 +++--- drivers/nvd

[PATCH v3 3/8] cxl: Drop cxl_device_lock()

2022-04-21 Thread Dan Williams
Now that all CXL subsystem locking is validated with custom lock classes, there is no need for the custom usage of the lockdep_mutex. Cc: Alison Schofield Cc: Vishal Verma Cc: Ira Weiny Cc: Ben Widawsky Cc: Jonathan Cameron Signed-off-by: Dan Williams --- drivers/cxl/core/pmem.c |4

[PATCH v3 2/8] cxl/acpi: Add root device lockdep validation

2022-04-21 Thread Dan Williams
ysocki" Cc: Ingo Molnar Cc: Will Deacon Cc: Waiman Long Cc: Boqun Feng Cc: Alison Schofield Cc: Vishal Verma Cc: Ira Weiny Cc: Ben Widawsky Cc: Jonathan Cameron Signed-off-by: Dan Williams --- drivers/cxl/acpi.c | 15 +++ include/linux/device.h | 25 +++

Re: [PATCH v13 0/7] fsdax: introduce fs query to support reflink

2022-04-20 Thread Dan Williams
[ add Andrew and Naoya ] On Wed, Apr 20, 2022 at 6:48 PM Shiyang Ruan wrote: > > Hi Dave, > > 在 2022/4/21 9:20, Dave Chinner 写道: > > Hi Ruan, > > > > On Tue, Apr 19, 2022 at 12:50:38PM +0800, Shiyang Ruan wrote: > >> This patchset is aimed to support shared pages tracking for fsdax. > > > > Now

Re: [PATCH v2 02/12] device-core: Add dev->lock_class to enable device_lock() lockdep validation

2022-04-14 Thread Dan Williams
On Thu, Apr 14, 2022 at 12:34 PM Peter Zijlstra wrote: > > On Thu, Apr 14, 2022 at 10:17:13AM -0700, Dan Williams wrote: > > > One more sanity check... So in driver subsystems there are cases where > > a device on busA hosts a topology on busB. When that happens there's a >

Re: [PATCH v2 02/12] device-core: Add dev->lock_class to enable device_lock() lockdep validation

2022-04-14 Thread Dan Williams
On Thu, Apr 14, 2022 at 3:16 AM Peter Zijlstra wrote: > > On Wed, Apr 13, 2022 at 03:01:21PM -0700, Dan Williams wrote: > > > > That's not an obvious conclusion; lockdep has lots of funny annotations, > > > subclasses is just one. > > > > > > I t

Re: [PATCH v2 03/12] cxl/core: Refactor a cxl_lock_class() out of cxl_nested_lock()

2022-04-13 Thread Dan Williams
On Wed, Apr 13, 2022 at 2:40 AM Peter Zijlstra wrote: > > > *Completely* untested (I wouldn't know where to begin and probably odn't > have the hardware anyway), and known incomplete. > > What's wrong with something like this then? > I'll give it a shot, I think it solves all the cringeworthy

Re: [PATCH v2 02/12] device-core: Add dev->lock_class to enable device_lock() lockdep validation

2022-04-13 Thread Dan Williams
On Wed, Apr 13, 2022 at 1:43 AM Peter Zijlstra wrote: > > On Tue, Apr 12, 2022 at 11:01:38PM -0700, Dan Williams wrote: > > The device_lock() is hidden from lockdep by default because, for > > example, a device subsystem may do something like: > > > > --- > >

Re: [PATCH v12 6/7] xfs: Implement ->notify_failure() for XFS

2022-04-13 Thread Dan Williams
On Tue, Apr 12, 2022 at 11:10 PM Dave Chinner wrote: > > On Tue, Apr 12, 2022 at 07:06:40PM -0700, Dan Williams wrote: > > On Tue, Apr 12, 2022 at 5:04 PM Dave Chinner wrote: > > > On Mon, Apr 11, 2022 at 12:09:03AM +0800, Shiyang Ruan wrote: > > > > Introdu

[PATCH v2 12/12] device-core: Enable multi-subsystem device_lock() lockdep validation

2022-04-13 Thread Dan Williams
: Greg Kroah-Hartman Cc: "Rafael J. Wysocki" Cc: Pierre-Louis Bossart Cc: Peter Zijlstra Cc: Ingo Molnar Cc: Will Deacon Cc: Waiman Long Cc: Boqun Feng Reviewed-by: Dave Jiang Reviewed-by: Kevin Tian Signed-off-by: Dan Williams --- drivers/cxl/acpi.c |2 - drivers/c

[PATCH v2 11/12] libnvdimm: Enable lockdep validation

2022-04-13 Thread Dan Williams
Register libnvdimm subsystem devices with a non-zero lock_class to enable the device-core to track lock dependencies. Cc: Vishal Verma Cc: Dave Jiang Cc: Ira Weiny Reviewed-by: Dave Jiang Reviewed-by: Kevin Tian Signed-off-by: Dan Williams --- drivers/nvdimm/bus.c |3 +++ drivers

[PATCH v2 08/12] libnvdimm: Refactor an nvdimm_lock_class() helper

2022-04-13 Thread Dan Williams
In preparation for moving to the device-core device_lock lockdep validation, refactor an nvdimm_lock_class() helper to be used with device_set_lock_class(). Cc: Vishal Verma Cc: Dave Jiang Cc: Ira Weiny Reviewed-by: Dave Jiang Reviewed-by: Kevin Tian Signed-off-by: Dan Williams --- drivers

[PATCH v2 10/12] libnvdimm: Drop nd_device_lock()

2022-04-13 Thread Dan Williams
rma Cc: Dave Jiang Cc: Ira Weiny Reviewed-by: Dave Jiang Reviewed-by: Kevin Tian Signed-off-by: Dan Williams --- drivers/nvdimm/btt_devs.c | 16 drivers/nvdimm/bus.c| 23 +- drivers/nvdimm/core.c | 10 +- drivers/nvd

[PATCH v2 09/12] ACPI: NFIT: Drop nfit_device_lock()

2022-04-13 Thread Dan Williams
a lock class for ACPI NFIT devices is added. Cc: Vishal Verma Cc: Dave Jiang Cc: Ira Weiny Cc: "Rafael J. Wysocki" Reviewed-by: Dave Jiang Reviewed-by: Kevin Tian Signed-off-by: Dan Williams --- drivers/acpi/nfit/core.c | 30 +++--- drivers/acpi/nfit/nfi

[PATCH v2 03/12] cxl/core: Refactor a cxl_lock_class() out of cxl_nested_lock()

2022-04-13 Thread Dan Williams
Widawsky Reviewed-by: Jonathan Cameron Reviewed-by: Dave Jiang Reviewed-by: Kevin Tian Signed-off-by: Dan Williams --- drivers/cxl/cxl.h | 19 +++ 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/drivers/cxl/cxl.h b/drivers/cxl/cxl.h index 990b6670222e

[PATCH v2 06/12] cxl/core: Use dev->lock_class for device_lock() lockdep validation

2022-04-13 Thread Dan Williams
ion. For now, that 'choice' is just between the NVDIMM and CXL subsystems. Cc: Alison Schofield Cc: Vishal Verma Cc: Ira Weiny Cc: Ben Widawsky Reviewed-by: Dave Jiang Reviewed-by: Kevin Tian Signed-off-by: Dan Williams --- drivers/cxl/core/memdev.c |1 + drivers/cxl/core/pmem.c |

[PATCH v2 07/12] cxl/acpi: Add a device_lock() lock class for the root platform device

2022-04-13 Thread Dan Williams
device_set_lock_class() called from cxl_acpi_probe(). Cc: Alison Schofield Cc: Vishal Verma Cc: Ira Weiny Cc: Ben Widawsky Reviewed-by: Dave Jiang Reviewed-by: Kevin Tian Signed-off-by: Dan Williams --- drivers/cxl/acpi.c |1 + drivers/cxl/cxl.h |3 ++- 2 files changed, 3 insertions

[PATCH v2 05/12] cxl/core: Clamp max lock_class

2022-04-13 Thread Dan Williams
Jiang Reviewed-by: Kevin Tian Signed-off-by: Dan Williams --- drivers/cxl/cxl.h | 25 + 1 file changed, 21 insertions(+), 4 deletions(-) diff --git a/drivers/cxl/cxl.h b/drivers/cxl/cxl.h index a6c1a027e389..b86aac8cde4f 100644 --- a/drivers/cxl/cxl.h +++ b/drivers/cxl

[PATCH v2 01/12] device-core: Move device_lock() lockdep init to a helper

2022-04-13 Thread Dan Williams
In preparation for new infrastructure to support lockdep validation of device_lock() usage across driver subsystems, add a device_lockdep_init() helper to contain those updates. Suggested-by: Pierre-Louis Bossart Reviewed-by: Dave Jiang Reviewed-by: Kevin Tian Signed-off-by: Dan Williams

[PATCH v2 04/12] cxl/core: Remove cxl_device_lock()

2022-04-13 Thread Dan Williams
device_lock(). A follow-on change to use the new dev->lock_class facility re-enables lockdep validation. Cc: Alison Schofield Cc: Vishal Verma Cc: Ira Weiny Cc: Ben Widawsky Reviewed-by: Jonathan Cameron Reviewed-by: Dave Jiang Reviewed-by: Kevin Tian Signed-off-by: Dan Williams --- drivers/

[PATCH v2 02/12] device-core: Add dev->lock_class to enable device_lock() lockdep validation

2022-04-13 Thread Dan Williams
upstream that was not caught by the current "local / after-the-fact" usage of dev->lockdep_mutex (commit 87a30e1f05d7 ("driver-core, libnvdimm: Let device subsystems add local lockdep coverage")). Cc: Greg Kroah-Hartman Cc: "Rafael J. Wysocki" Reviewed-by: Dave Jia

[PATCH v2 00/12] device-core: Enable device_lock() lockdep validation

2022-04-13 Thread Dan Williams
bsystems add local lockdep coverage") --- Dan Williams (12): device-core: Move device_lock() lockdep init to a helper device-core: Add dev->lock_class to enable device_lock() lockdep validation cxl/core: Refactor a cxl_lock_class() out of cxl_nested_lock()

Re: [PATCH v12 6/7] xfs: Implement ->notify_failure() for XFS

2022-04-12 Thread Dan Williams
On Tue, Apr 12, 2022 at 5:04 PM Dave Chinner wrote: > > On Mon, Apr 11, 2022 at 12:09:03AM +0800, Shiyang Ruan wrote: > > Introduce xfs_notify_failure.c to handle failure related works, such as > > implement ->notify_failure(), register/unregister dax holder in xfs, and > > so on. > > > > If the

Re: [PATCH v12 1/7] dax: Introduce holder for dax_device

2022-04-12 Thread Dan Williams
t we >can finally track to the filesystem we needed. > > The holder and holder_ops will be set when filesystem is being mounted, > or an target device is being activated. > Looks good to me: Reviewed-by: Dan Williams I am assuming this will be staged in a common DAX branch, but holler now if this should go through the XFS tree.

Re: [PATCH v11 7/8] xfs: Implement ->notify_failure() for XFS

2022-04-08 Thread Dan Williams
On Thu, Apr 7, 2022 at 11:05 PM Shiyang Ruan wrote: > > > > 在 2022/3/30 14:00, Christoph Hellwig 写道: > >> @@ -1892,6 +1893,8 @@ xfs_free_buftarg( > >> list_lru_destroy(>bt_lru); > >> > >> blkdev_issue_flush(btp->bt_bdev); > >> +if (btp->bt_daxdev) > >> +

Re: [PATCH v11 7/8] xfs: Implement ->notify_failure() for XFS

2022-04-08 Thread Dan Williams
On Tue, Mar 29, 2022 at 11:01 PM Christoph Hellwig wrote: > > > @@ -1892,6 +1893,8 @@ xfs_free_buftarg( > > list_lru_destroy(>bt_lru); > > > > blkdev_issue_flush(btp->bt_bdev); > > + if (btp->bt_daxdev) > > + dax_unregister_holder(btp->bt_daxdev, btp->bt_mount); > >

Re: [PATCH v11 1/8] dax: Introduce holder for dax_device

2022-04-07 Thread Dan Williams
[ add Mauro and Tony for RAS discussion ] On Wed, Apr 6, 2022 at 1:39 PM Darrick J. Wong wrote: > > On Tue, Apr 05, 2022 at 06:22:48PM -0700, Dan Williams wrote: > > On Tue, Apr 5, 2022 at 5:55 PM Jane Chu wrote: > > > > > > On 3/30/2022 9:18 AM, Darrick J. Wong

Re: [PATCH v11 1/8] dax: Introduce holder for dax_device

2022-04-05 Thread Dan Williams
On Tue, Apr 5, 2022 at 5:55 PM Jane Chu wrote: > > On 3/30/2022 9:18 AM, Darrick J. Wong wrote: > > On Wed, Mar 30, 2022 at 08:49:29AM -0700, Christoph Hellwig wrote: > >> On Wed, Mar 30, 2022 at 06:58:21PM +0800, Shiyang Ruan wrote: > >>> As the code I pasted before, pmem driver will subtract

[GIT PULL] LIBNVDIMM update for v5.18

2022-03-29 Thread Dan Williams
support for nvdimm events, initially only for 'papr_scm' devices. - Deprecate the 'block aperture' support in libnvdimm, it only ever existed in the specification, not in shipping product. Dan Williams (6): nvdimm/region

Re: [PATCH 2/2] powerpc/papr_scm: Fix build failure when CONFIG_PERF_EVENTS is not set

2022-03-23 Thread Dan Williams
On Wed, Mar 23, 2022 at 3:05 AM Michael Ellerman wrote: > > Dan Williams writes: > > On Tue, Mar 22, 2022 at 7:30 AM kajoljain wrote: > >> On 3/22/22 03:09, Dan Williams wrote: > >> > On Fri, Mar 18, 2022 at 4:42 AM Kajol Jain wrote: > >> >>

Re: [PATCH v1] device-dax: Adding match parameter to select which driver to match dax devices

2022-03-22 Thread Dan Williams
On Mon, Feb 28, 2022 at 1:50 AM Zhenguo Yao wrote: > > device_dax driver always match dax devices by default. The other > drivers only match devices by dax_id. There are situations which > need kmem drvier match all the dax device at boot time. So > adding a parameter to support this function.

[GIT PULL] DAX update for 5.18

2022-03-22 Thread Dan Williams
Hi Linus, please pull from: git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm tags/dax-for-5.18 ...to receive a small collection of dax fixes for 5.18. Andrew has been shepherding major dax features that touch the core -mm through his tree, but I still collect the dax updates that

Re: [PATCH 2/2] powerpc/papr_scm: Fix build failure when CONFIG_PERF_EVENTS is not set

2022-03-22 Thread Dan Williams
On Tue, Mar 22, 2022 at 7:30 AM kajoljain wrote: > > > > On 3/22/22 03:09, Dan Williams wrote: > > On Fri, Mar 18, 2022 at 4:42 AM Kajol Jain wrote: > >> > >> The following build failure occures when CONFIG_PERF_EVENTS is not set > >> as generic p

Re: [PATCH 1/2] drivers/nvdimm: Fix build failure when CONFIG_PERF_EVENTS is not set

2022-03-21 Thread Dan Williams
On Fri, Mar 18, 2022 at 4:42 AM Kajol Jain wrote: > > The following build failure occures when CONFIG_PERF_EVENTS is not set > as generic pmu functions are not visible in that scenario. > > |-- s390-randconfig-r044-20220313 > | |--

Re: [PATCH 2/2] powerpc/papr_scm: Fix build failure when CONFIG_PERF_EVENTS is not set

2022-03-21 Thread Dan Williams
On Mon, Mar 21, 2022 at 2:39 PM Dan Williams wrote: > > On Fri, Mar 18, 2022 at 4:42 AM Kajol Jain wrote: > > > > The following build failure occures when CONFIG_PERF_EVENTS is not set > > as generic pmu functions are not visible in that scenario. > > >

Re: [PATCH 2/2] powerpc/papr_scm: Fix build failure when CONFIG_PERF_EVENTS is not set

2022-03-21 Thread Dan Williams
On Fri, Mar 18, 2022 at 4:42 AM Kajol Jain wrote: > > The following build failure occures when CONFIG_PERF_EVENTS is not set > as generic pmu functions are not visible in that scenario. > > arch/powerpc/platforms/pseries/papr_scm.c:372:35: error: ‘struct perf_event’ > has no member named ‘attr’

Re: [PATCH] MAINTAINERS: remove section LIBNVDIMM BLK: MMIO-APERTURE DRIVER

2022-03-15 Thread Dan Williams
On Tue, Mar 15, 2022 at 10:21 PM Lukas Bulwahn wrote: > > Commit f8669f1d6a86 ("nvdimm/blk: Delete the block-aperture window driver") > removes the file drivers/nvdimm/blk.c, but misses to adjust MAINTAINERS. > > Hence, ./scripts/get_maintainer.pl --self-test=patterns complains about a > broken

Re: [PATCH v4 5/6] dax: fix missing writeprotect the pte entry

2022-03-14 Thread Dan Williams
On Fri, Mar 11, 2022 at 1:06 AM Muchun Song wrote: > > On Thu, Mar 10, 2022 at 8:59 AM Dan Williams wrote: > > > > On Wed, Mar 2, 2022 at 12:30 AM Muchun Song > > wrote: > > > > > > Currently dax_mapping_entry_mkclean() fails to clean and write pr

Re: [PATCH v11 1/8] dax: Introduce holder for dax_device

2022-03-11 Thread Dan Williams
On Sun, Feb 27, 2022 at 4:08 AM Shiyang Ruan wrote: > > To easily track filesystem from a pmem device, we introduce a holder for > dax_device structure, and also its operation. This holder is used to > remember who is using this dax_device: > - When it is the backend of a filesystem, the holder

Re: [PATCH] fs/dax: Fix run_dax() missing prototype

2022-03-09 Thread Dan Williams
On Fri, Mar 4, 2022 at 12:38 PM wrote: > > From: Ira Weiny > > The function run_dax() was missing a prototype when compiling with > warnings. > > Add bus.h to fix this. > Always include the warning and the compiler in the changelog. I suspect you hit this with LLVM and not gcc? super.c has no

Re: [PATCH] fs/dax: Fix missing kdoc for dax_device

2022-03-09 Thread Dan Williams
On Fri, Mar 4, 2022 at 12:47 PM wrote: > > From: Ira Weiny > > struct dax_device has a member named ops which was undocumented. > > Add the kdoc. > Applied, but I fixed up the subject prefix to just "dax:" since this is shared between the fs-dax and device-dax.

Re: [PATCH v7 0/4] Add perf interface to expose nvdimm

2022-03-09 Thread Dan Williams
On Mon, Mar 7, 2022 at 9:27 PM kajoljain wrote: > > Hi Dan, > Can you take this patch-set if it looks fine to you. > Pushed out to my libnvdimm-pending branch for a 0day confirmation before heading over to linux-next.

Re: [PATCH 05/11] cxl/core: Introduce cxl_set_lock_class()

2022-03-09 Thread Dan Williams
On Wed, Mar 9, 2022 at 10:33 AM Jonathan Cameron wrote: > > On Mon, 28 Feb 2022 18:49:17 -0800 > Dan Williams wrote: > > > Update CONFIG_PROVE_CXL_LOCKING to use the common device-core helpers > > for device_lock validation. > > > > When CONFIG_PROVE_LOCKING

Re: [PATCH 03/11] cxl/core: Remove cxl_device_lock()

2022-03-09 Thread Dan Williams
On Wed, Mar 9, 2022 at 10:22 AM Jonathan Cameron wrote: > > On Mon, 28 Feb 2022 18:49:06 -0800 > Dan Williams wrote: > > > In preparation for moving lockdep_mutex nested lock acquisition into the > > core, remove the cxl_device_lock() wrapper, but preserve > > cxl_

Re: [PATCH v4 6/6] mm: remove range parameter from follow_invalidate_pte()

2022-03-09 Thread Dan Williams
use page_mkclean_one" directly feedback is workable. Otherwise you can add: Reviewed-by: Dan Williams

Re: [PATCH v4 5/6] dax: fix missing writeprotect the pte entry

2022-03-09 Thread Dan Williams
On Wed, Mar 2, 2022 at 12:30 AM Muchun Song wrote: > > Currently dax_mapping_entry_mkclean() fails to clean and write protect > the pte entry within a DAX PMD entry during an *sync operation. This > can result in data loss in the following sequence: > > 1) process A mmap write to DAX PMD,

Re: [PATCH v4 3/6] mm: rmap: introduce pfn_mkclean_range() to cleans PTEs

2022-03-09 Thread Dan Williams
On Wed, Mar 9, 2022 at 4:26 PM Dan Williams wrote: > > On Wed, Mar 2, 2022 at 12:29 AM Muchun Song wrote: > > > > The page_mkclean_one() is supposed to be used with the pfn that has a > > associated struct page, but not all the pfns (e.g. DAX) have a struct > >

Re: [PATCH v4 3/6] mm: rmap: introduce pfn_mkclean_range() to cleans PTEs

2022-03-09 Thread Dan Williams
On Wed, Mar 2, 2022 at 12:29 AM Muchun Song wrote: > > The page_mkclean_one() is supposed to be used with the pfn that has a > associated struct page, but not all the pfns (e.g. DAX) have a struct > page. Introduce a new function pfn_mkclean_range() to cleans the PTEs > (including PMDs) mapped

<    1   2   3   4   5   6   7   8   9   10   >