Re: [PATCH 04/11] cxl/core: Clamp max lock_class

2022-03-09 Thread Dan Williams
On Wed, Mar 9, 2022 at 10:27 AM Jonathan Cameron wrote: > > On Mon, 28 Feb 2022 18:49:11 -0800 > Dan Williams wrote: > > > MAX_LOCKDEP_SUBCLASSES limits the depth of the CXL topology that can be > > validated by lockdep. Given that the cxl_test topology is already at >

Re: [PATCH 02/11] cxl/core: Refactor a cxl_lock_class() out of cxl_nested_lock()

2022-03-09 Thread Dan Williams
On Wed, Mar 9, 2022 at 10:19 AM Jonathan Cameron wrote: > > On Mon, 28 Feb 2022 18:49:00 -0800 > Dan Williams wrote: > > > In preparation for upleveling device_lock() lockdep annotation support into > > the core, provide a helper to retrieve the lock class. This loc

[PATCH 09/11] libnvdimm: Drop nd_device_lock()

2022-02-28 Thread Dan Williams
In preparation for switching to the core device_lock lockdep validation scheme, convert nd_device_lock() calls back to device_lock(). 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 11/11] device-core: Introduce a per-subsystem lockdep_mutex

2022-02-28 Thread Dan Williams
: "Rafael J. Wysocki" Cc: Alison Schofield Cc: Vishal Verma Cc: Ira Weiny Cc: Ben Widawsky Cc: Dave Jiang Signed-off-by: Dan Williams --- drivers/base/core.c |6 +-- drivers/cxl/acpi.c |2 + drivers/cxl/cxl.h|4 +- drivers/cxl/port.c |2 + drivers

[PATCH 10/11] libnvdimm: Enable lockdep validation

2022-02-28 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 Signed-off-by: Dan Williams --- drivers/nvdimm/bus.c |3 +++ drivers/nvdimm/nd-core.h |9 + 2 files changed

[PATCH 08/11] ACPI: NFIT: Drop nfit_device_lock()

2022-02-28 Thread Dan Williams
Signed-off-by: Dan Williams --- drivers/acpi/nfit/core.c | 30 +++--- drivers/acpi/nfit/nfit.h | 24 2 files changed, 15 insertions(+), 39 deletions(-) diff --git a/drivers/acpi/nfit/core.c b/drivers/acpi/nfit/core.c index e5d7f2bda13f..31

[PATCH 07/11] libnvdimm: Refactor an nvdimm_lock_class() helper

2022-02-28 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 Signed-off-by: Dan Williams --- drivers/nvdimm/nd-core.h | 21 + 1

[PATCH 06/11] cxl/acpi: Add a lock class for the root platform device

2022-02-28 Thread Dan Williams
-by: Dan Williams --- drivers/cxl/acpi.c |1 + drivers/cxl/cxl.h |3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/cxl/acpi.c b/drivers/cxl/acpi.c index 37bc8d787999..7fa7bf6088cd 100644 --- a/drivers/cxl/acpi.c +++ b/drivers/cxl/acpi.c @@ -313,6 +313,7 @@ static

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

2022-02-28 Thread Dan Williams
. Cc: Alison Schofield Cc: Vishal Verma Cc: Ira Weiny Cc: Ben Widawsky Signed-off-by: Dan Williams --- drivers/cxl/core/memdev.c |1 + drivers/cxl/core/pmem.c |2 ++ drivers/cxl/core/port.c |2 ++ drivers/cxl/core/region.c |1 + drivers/cxl/cxl.h |9 + 5

[PATCH 04/11] cxl/core: Clamp max lock_class

2022-02-28 Thread Dan Williams
MAX_LOCKDEP_SUBCLASSES limits the depth of the CXL topology that can be validated by lockdep. Given that the cxl_test topology is already at this limit collapse some of the levels and clamp the max depth. Cc: Alison Schofield Cc: Vishal Verma Cc: Ira Weiny Cc: Ben Widawsky Signed-off-by: Dan

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

2022-02-28 Thread Dan Williams
Signed-off-by: Dan Williams --- drivers/cxl/core/pmem.c |4 ++-- drivers/cxl/core/port.c | 50 ++- drivers/cxl/cxl.h | 46 --- drivers/cxl/mem.c |4 ++-- drivers/cxl/pmem.c | 12

[PATCH 02/11] cxl/core: Refactor a cxl_lock_class() out of cxl_nested_lock()

2022-02-28 Thread Dan Williams
Widawsky 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 5486fb6aebd4..ca8a61a623b7 100644 --- a/drivers/cxl/cxl.h +++ b/drivers/cxl/cxl.h @@ -509,13 +509,12

[PATCH 01/11] device-core: Enable lockdep validation

2022-02-28 Thread Dan Williams
subsystem that wants a distinct lock class number space. Cc: Greg Kroah-Hartman Cc: "Rafael J. Wysocki" Signed-off-by: Dan Williams --- drivers/base/core.c|1 + include/linux/device.h | 73 +++- 2 files changed, 72 insertions(+),

[PATCH 00/11] device-core: Generic device-lock lockdep validation

2022-02-28 Thread Dan Williams
. --- Dan Williams (11): device-core: Enable lockdep validation cxl/core: Refactor a cxl_lock_class() out of cxl_nested_lock() cxl/core: Remove cxl_device_lock() cxl/core: Clamp max lock_class cxl/core: Introduce cxl_set_lock_class() cxl/acpi: Add a lock class

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

2022-02-23 Thread Dan Williams
On Wed, Feb 23, 2022 at 11:07 AM Dan Williams wrote: > > On Fri, Feb 18, 2022 at 10:06 AM Dan Williams > wrote: > > > > On Thu, Feb 17, 2022 at 8:34 AM Kajol Jain wrote: > > > > > > Patchset adds performance stats reporting support for nvdimm. > &g

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

2022-02-23 Thread Dan Williams
On Fri, Feb 18, 2022 at 10:06 AM Dan Williams wrote: > > On Thu, Feb 17, 2022 at 8:34 AM Kajol Jain wrote: > > > > Patchset adds performance stats reporting support for nvdimm. > > Added interface includes support for pmu register/unregister > > functions. A struct

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

2022-02-18 Thread Dan Williams
5 -> Resend v5 > - Resend the patchset > > - Link to the patchset v5: https://lkml.org/lkml/2021/9/28/643 > > v4 -> v5: > - Remove multiple variables defined in nvdimm_pmu structure include > name and pmu functions(event_int/add/del/read) as they are just > used

Re: [RFC v3 2/2] pmem: enable pmem_submit_bio for asynchronous flush

2022-02-16 Thread Dan Williams
On Wed, Feb 16, 2022 at 12:39 AM Pankaj Gupta wrote: > > > > > > > Return from "pmem_submit_bio" when asynchronous flush is > > > still in progress in other context. > > > > > > Signed-off-by: Pankaj Gupta > > > --- > > > drivers/nvdimm/pmem.c| 15 --- > > >

Re: [RFC v3 1/2] virtio-pmem: Async virtio-pmem flush

2022-02-16 Thread Dan Williams
On Wed, Feb 16, 2022 at 12:47 AM Pankaj Gupta wrote: > > > > > > > Enable asynchronous flush for virtio pmem using work queue. Also, > > > coalesce the flush requests when a flush is already in process. > > > This functionality is copied from md/RAID code. > > > > > > When a flush is already in

Re: [RFC v3 2/2] pmem: enable pmem_submit_bio for asynchronous flush

2022-02-15 Thread Dan Williams
On Tue, Jan 11, 2022 at 8:21 AM Pankaj Gupta wrote: > > Return from "pmem_submit_bio" when asynchronous flush is > still in progress in other context. > > Signed-off-by: Pankaj Gupta > --- > drivers/nvdimm/pmem.c| 15 --- > drivers/nvdimm/region_devs.c | 4 +++- > 2 files

Re: [RFC v3 1/2] virtio-pmem: Async virtio-pmem flush

2022-02-15 Thread Dan Williams
On Tue, Jan 11, 2022 at 8:23 AM Pankaj Gupta wrote: > > Enable asynchronous flush for virtio pmem using work queue. Also, > coalesce the flush requests when a flush is already in process. > This functionality is copied from md/RAID code. > > When a flush is already in process, new flush requests

Re: [PATCH v10 9/9] fsdax: set a CoW flag when associate reflink mappings

2022-02-15 Thread Dan Williams
On Tue, Feb 15, 2022 at 6:55 PM Shiyang Ruan wrote: > > > > 在 2022/2/16 10:09, Dan Williams 写道: > > On Thu, Jan 27, 2022 at 4:41 AM Shiyang Ruan > > wrote: > >> > >> Introduce a PAGE_MAPPING_DAX_COW flag to support association with CoW file > >

Re: [PATCH v10 5/9] fsdax: Introduce dax_load_page()

2022-02-15 Thread Dan Williams
On Tue, Feb 15, 2022 at 7:02 PM Shiyang Ruan wrote: > > > > 在 2022/2/16 9:34, Dan Williams 写道: > > On Thu, Jan 27, 2022 at 4:41 AM Shiyang Ruan > > wrote: > >> > >> The current dax_lock_page() locks dax entry by obtaining mapping and > >> i

Re: [PATCH v10 9/9] fsdax: set a CoW flag when associate reflink mappings

2022-02-15 Thread Dan Williams
On Thu, Jan 27, 2022 at 4:41 AM Shiyang Ruan wrote: > > Introduce a PAGE_MAPPING_DAX_COW flag to support association with CoW file > mappings. In this case, the dax-RMAP already takes the responsibility > to look up for shared files by given dax page. The page->mapping is no > longer to used

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

2022-02-15 Thread Dan Williams
On Thu, Jan 27, 2022 at 4:41 AM 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 rmap feature of XFS enabled, we can query it to find files and > metadata

Re: [PATCH v10 7/9] mm: Introduce mf_dax_kill_procs() for fsdax case

2022-02-15 Thread Dan Williams
On Thu, Jan 27, 2022 at 4:41 AM Shiyang Ruan wrote: > > This function is called at the end of RMAP routine, i.e. filesystem > recovery function, to collect and kill processes using a shared page of > DAX file. The difference with mf_generic_kill_procs() is, it accepts > file's (mapping,offset)

Re: [PATCH v10 7/9] mm: Introduce mf_dax_kill_procs() for fsdax case

2022-02-15 Thread Dan Williams
add_to_kill(t, page, vma, to_kill); > + add_to_kill(t, page, 0, vma, to_kill); Why is the @pgoff argument 0? @pgoff is available. Not that I expect dax pages will ever be anonymous, might as well not leave that land mine for future refactoring. Other than that you can add: Reviewed-by: Dan Williams

Re: [PATCH v10 6/9] mm: move pgoff_address() to vma_pgoff_address()

2022-02-15 Thread Dan Williams
On Thu, Jan 27, 2022 at 4:41 AM Shiyang Ruan wrote: > > Since it is not a DAX-specific function, move it into mm and rename it > to be a generic helper. > > Signed-off-by: Shiyang Ruan > Reviewed-by: Christoph Hellwig Looks ok to me. Reviewed-by: Dan Williams

Re: [PATCH v10 5/9] fsdax: Introduce dax_load_page()

2022-02-15 Thread Dan Williams
On Thu, Jan 27, 2022 at 4:41 AM Shiyang Ruan wrote: > > The current dax_lock_page() locks dax entry by obtaining mapping and > index in page. To support 1-to-N RMAP in NVDIMM, we need a new function > to lock a specific dax entry I do not see a call to dax_lock_entry() in this function, what

Re: [PATCH v10 4/9] fsdax: fix function description

2022-02-15 Thread Dan Williams
On Wed, Feb 2, 2022 at 5:04 AM Christoph Hellwig wrote: > > Dan, can you send this to Linus for 5.17 to get it out of the queue? Sure.

Re: [PATCH v10 3/9] pagemap,pmem: Introduce ->memory_failure()

2022-02-15 Thread Dan Williams
PNOTSUPP, the caller > +* will fall back to a common handler called mf_generic_kill_procs(). > +*/ > + int (*memory_failure)(struct dev_pagemap *pgmap, unsigned long pfn, > + u64 len, int mf_flags); I think it is odd to have the start address be in terms of pfns and the length by in terms of bytes. I would either change @len to @nr_pages, or change @pfn to @phys and make it a phys_addr_t. Otherwise you can add, Reviewed-by: Dan Williams

Re: [PATCH v10 2/9] mm: factor helpers for memory_failure_dev_pagemap

2022-02-15 Thread Dan Williams
d-by: Darrick J. Wong > Reviewed-by: Christoph Hellwig Looks good, Reviewed-by: Dan Williams

Re: [PATCH v10.1 1/9] dax: Introduce holder for dax_device

2022-02-15 Thread Dan Williams
On Sun, Feb 13, 2022 at 4:58 AM Shiyang Ruan wrote: > > v10.1 update: > - Fix build error reported by kernel test robot > - Add return code to dax_register_holder() > - Add write lock to prevent concurrent registrations > - Rename dax_get_holder() to dax_holder() > - Add kernel doc for new

Re: [PATCH v9 02/10] dax: Introduce holder for dax_device

2022-02-15 Thread Dan Williams
On Thu, Jan 20, 2022 at 6:22 PM Darrick J. Wong wrote: > > On Fri, Jan 21, 2022 at 09:26:52AM +0800, Shiyang Ruan wrote: > > > > > > 在 2022/1/20 16:46, Christoph Hellwig 写道: > > > On Wed, Jan 05, 2022 at 04:12:04PM -0800, Dan Williams wrote: > > > >

Re: [PATCH] dax: make sure inodes are flushed before destroy cache

2022-02-14 Thread Dan Williams
On Mon, Feb 14, 2022 at 9:59 AM Ira Weiny wrote: > > On Fri, Feb 11, 2022 at 11:11:11PM -0800, Tong Zhang wrote: > > A bug can be triggered by following command > > > > $ modprobe nd_pmem && modprobe -r nd_pmem > > > > [ 10.060014] BUG dax_cache (Not tainted): Objects remaining in dax_cache >

Re: [PATCH v9 02/10] dax: Introduce holder for dax_device

2022-01-05 Thread Dan Williams
On Wed, Jan 5, 2022 at 3:54 PM Darrick J. Wong wrote: [..] > > Yes, I think we should just fail the holder registration and > > DAX+reflink unless the FS being mounted on a whole device. I know Ted > > and others had reservations about moving filesystems to be mounted on > > dax-devices directly,

Re: [PATCH v9 02/10] dax: Introduce holder for dax_device

2022-01-05 Thread Dan Williams
On Wed, Jan 5, 2022 at 2:47 PM Darrick J. Wong wrote: > > On Wed, Jan 05, 2022 at 11:20:12AM -0800, Dan Williams wrote: > > On Wed, Jan 5, 2022 at 10:56 AM Darrick J. Wong wrote: > > > > > > On Wed, Jan 05, 2022 at 10:23:08AM -0800, Dan Williams wrote: > >

Re: [PATCH v9 09/10] xfs: Implement ->notify_failure() for XFS

2022-01-05 Thread Dan Williams
On Wed, Jan 5, 2022 at 10:53 AM Darrick J. Wong wrote: > > On Sun, Dec 26, 2021 at 10:34:38PM +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

Re: [PATCH v9 02/10] dax: Introduce holder for dax_device

2022-01-05 Thread Dan Williams
On Wed, Jan 5, 2022 at 10:56 AM Darrick J. Wong wrote: > > On Wed, Jan 05, 2022 at 10:23:08AM -0800, Dan Williams wrote: > > On Wed, Jan 5, 2022 at 10:12 AM Darrick J. Wong wrote: > > > > > > On Sun, Dec 26, 2021 at 10:34:31PM +0800, Shiyang Ruan wrote: > >

Re: [PATCH v9 02/10] dax: Introduce holder for dax_device

2022-01-05 Thread Dan Williams
On Wed, Jan 5, 2022 at 10:12 AM Darrick J. Wong wrote: > > On Sun, Dec 26, 2021 at 10:34:31PM +0800, 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

Re: [PATCH v9 06/10] fsdax: Introduce dax_lock_mapping_entry()

2022-01-04 Thread Dan Williams
On Sun, Dec 26, 2021 at 6:35 AM Shiyang Ruan wrote: > > The current dax_lock_page() locks dax entry by obtaining mapping and > index in page. To support 1-to-N RMAP in NVDIMM, we need a new function > to lock a specific dax entry corresponding to this file's mapping,index. > And output the page

Re: [PATCH v9 01/10] dax: Use percpu rwsem for dax_{read,write}_lock()

2022-01-04 Thread Dan Williams
On Sun, Dec 26, 2021 at 6:35 AM Shiyang Ruan wrote: > > In order to introduce dax holder registration, we need a write lock for > dax. As far as I can see, no, a write lock is not needed while the holder is being registered. The synchronization that is needed is to make sure that the device

Re: [PATCH v1 1/1] ACPI: NFIT: Import GUID before use

2021-12-17 Thread Dan Williams
On Fri, Dec 17, 2021 at 10:10 AM Rafael J. Wysocki wrote: > > On Mon, Dec 13, 2021 at 9:46 PM Andy Shevchenko > wrote: > > > > Strictly speaking the comparison between guid_t and raw buffer > > is not correct. Import GUID to variable of guid_t type and then > > compare. > > > > Signed-off-by:

Re: [PATCH v8 2/9] dax: Introduce holder for dax_device

2021-12-14 Thread Dan Williams
On Thu, Dec 2, 2021 at 12:49 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 v10 7/8] xfs: support CoW in fsdax mode

2021-10-14 Thread Dan Williams
On Thu, Oct 14, 2021 at 10:38 AM Darrick J. Wong wrote: > > On Tue, Sep 28, 2021 at 02:23:10PM +0800, Shiyang Ruan wrote: > > In fsdax mode, WRITE and ZERO on a shared extent need CoW performed. > > After that, new allocated extents needs to be remapped to the file. > > So, add a CoW

[GIT PULL] nvdimm fixes for v5.15-rc4

2021-10-01 Thread Dan Williams
Hi Linus, please pull from: git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm tags/libnvdimm-fixes-5.15-rc4 ...to receive a fix for a regression added this cycle in the pmem driver, and for a long standing bug for failed NUMA node lookups on ARM64. This has appeared in -next for

Re: [PATCH 0/3] dax: clear poison on the fly along pwrite

2021-09-23 Thread Dan Williams
On Thu, Sep 23, 2021 at 1:56 PM Jane Chu wrote: [..] > > This (AFAICT) has already been done for dax_zero_page_range, so I sense > > that Dan is trying to save you a bunch of code plumbing work by nudging > > you towards doing s/dax_clear_poison/dax_zero_page_range/ to this series > > and then

Re: [PATCH 0/3] dax: clear poison on the fly along pwrite

2021-09-17 Thread Dan Williams
On Fri, Sep 17, 2021 at 8:27 AM Darrick J. Wong wrote: > > On Fri, Sep 17, 2021 at 01:53:33PM +0100, Christoph Hellwig wrote: > > On Thu, Sep 16, 2021 at 11:40:28AM -0700, Dan Williams wrote: > > > > That was my gut feeling. If everyone feels 100% comfortable with > &g

Re: [PATCH 0/3] dax: clear poison on the fly along pwrite

2021-09-17 Thread Dan Williams
On Fri, Sep 17, 2021 at 5:57 AM Christoph Hellwig wrote: > > On Thu, Sep 16, 2021 at 11:40:28AM -0700, Dan Williams wrote: > > > That was my gut feeling. If everyone feels 100% comfortable with > > > zeroingas the mechanism to clear poisoning I'll cave in. The

Re: [PATCH 0/3] dax: clear poison on the fly along pwrite

2021-09-16 Thread Dan Williams
On Thu, Sep 16, 2021 at 12:12 AM Christoph Hellwig wrote: > > On Wed, Sep 15, 2021 at 01:27:47PM -0700, Dan Williams wrote: > > > Yeah, Christoph suggested that we make the clearing operation explicit > > > in a related thread a few weeks ago: > > > http

Re: [PATCH 0/3] dax: clear poison on the fly along pwrite

2021-09-15 Thread Dan Williams
On Wed, Sep 15, 2021 at 9:15 AM Darrick J. Wong wrote: > > On Wed, Sep 15, 2021 at 12:22:05AM -0700, Jane Chu wrote: > > Hi, Dan, > > > > On 9/14/2021 9:44 PM, Dan Williams wrote: > > > On Tue, Sep 14, 2021 at 4:32 PM Jane Chu wrote: > > > > > >

Re: [PATCH v2] device-dax: use fallback nid when numa node is invalid

2021-09-15 Thread Dan Williams
On Tue, Sep 14, 2021 at 11:51 PM Justin He wrote: [..] > > > diff --git a/drivers/acpi/nfit/core.c b/drivers/acpi/nfit/core.c > > > index fb775b967c52..d3a0cec635b1 100644 > > > --- a/drivers/acpi/nfit/core.c > > > +++ b/drivers/acpi/nfit/core.c > > > @@ -3005,15 +3005,8 @@ static int

Re: [PATCH v2] device-dax: use fallback nid when numa node is invalid

2021-09-14 Thread Dan Williams
On Mon, Sep 13, 2021 at 7:06 PM Justin He wrote: > > Hi Dan, > > > -Original Message----- > > From: Dan Williams > > Sent: Friday, September 10, 2021 11:42 PM > > To: Justin He > > Cc: Vishal Verma ; Dave Jiang > > ; David Hildenbrand ; Linux

Re: [PATCH 0/3] dax: clear poison on the fly along pwrite

2021-09-14 Thread Dan Williams
On Tue, Sep 14, 2021 at 4:32 PM Jane Chu wrote: > > If pwrite(2) encounters poison in a pmem range, it fails with EIO. > This is unecessary if hardware is capable of clearing the poison. > > Though not all dax backend hardware has the capability of clearing > poison on the fly, but dax backed by

Re: [RESEND PATCH v4 1/4] drivers/nvdimm: Add nvdimm pmu structure

2021-09-14 Thread Dan Williams
On Tue, Sep 14, 2021 at 9:08 PM Dan Williams wrote: > > On Thu, Sep 9, 2021 at 12:56 AM kajoljain wrote: > > > > > > > > On 9/8/21 3:29 AM, Dan Williams wrote: > > > Hi Kajol, > > > > > > Apologies for the delay in responding to this serie

Re: [RESEND PATCH v4 1/4] drivers/nvdimm: Add nvdimm pmu structure

2021-09-14 Thread Dan Williams
On Thu, Sep 9, 2021 at 12:56 AM kajoljain wrote: > > > > On 9/8/21 3:29 AM, Dan Williams wrote: > > Hi Kajol, > > > > Apologies for the delay in responding to this series, some comments below: > > Hi Dan, > No issues, thanks for reviewing the patches. &g

Re: [PATCH v2] device-dax: use fallback nid when numa node is invalid

2021-09-10 Thread Dan Williams
On Fri, Sep 10, 2021 at 5:46 AM Jia He wrote: > > Previously, numa_off was set unconditionally in dummy_numa_init() > even with a fake numa node. Then ACPI sets node id as NUMA_NO_NODE(-1) > after acpi_map_pxm_to_node() because it regards numa_off as turning > off the numa node. Hence

[GIT PULL] libnvdimm / persistent memory update for v5.15

2021-09-08 Thread Dan Williams
the dax_read_lock() locking into dax_supported dax: remove __generic_fsdax_supported dax: stub out dax_supported for !CONFIG_FS_DAX xfs: factor out a xfs_buftarg_is_dax helper dax: remove bdev_dax_supported Dan Williams (1): Merge branch 'for-5.15/fsdax-cleanups

Re: [RESEND PATCH v4 4/4] powerpc/papr_scm: Document papr_scm sysfs event format entries

2021-09-07 Thread Dan Williams
On Thu, Sep 2, 2021 at 10:11 PM Kajol Jain wrote: > > Details is added for the event, cpumask and format attributes > in the ABI documentation. > > Acked-by: Peter Zijlstra (Intel) > Reviewed-by: Madhavan Srinivasan > Tested-by: Nageswara R Sastry > Signed-off-by: Kajol Jain > --- >

Re: [RESEND PATCH v4 1/4] drivers/nvdimm: Add nvdimm pmu structure

2021-09-07 Thread Dan Williams
Hi Kajol, Apologies for the delay in responding to this series, some comments below: On Thu, Sep 2, 2021 at 10:10 PM Kajol Jain wrote: > > A structure is added, called nvdimm_pmu, for performance > stats reporting support of nvdimm devices. It can be used to add > nvdimm pmu data such as

Re: RDMA/rpma + fsdax(ext4) was broken since 36f30e486d

2021-08-27 Thread Dan Williams
On Fri, Aug 27, 2021 at 6:05 AM Li, Zhijian wrote: > > > on 2021/8/27 20:10, Jason Gunthorpe wrote: > > On Fri, Aug 27, 2021 at 08:15:40AM +, lizhij...@fujitsu.com wrote: > >> i looked over the change-log of hmm_vma_handle_pte(), and found that before > >> 4055062 ("mm/hmm: add missing call

Re: [PATCH v7 7/8] fsdax: Introduce dax_iomap_ops for end of reflink

2021-08-26 Thread Dan Williams
On Thu, Aug 26, 2021 at 8:30 PM Shiyang Ruan wrote: > > > > On 2021/8/20 23:18, Dan Williams wrote: > > On Thu, Aug 19, 2021 at 11:13 PM ruansy.fnst > > wrote: > >> > >> > >> > >> On 2021/8/20 上午11:01, Dan Williams wrote: >

Re: [PATCH v7 3/8] fsdax: Replace mmap entry in case of CoW

2021-08-26 Thread Dan Williams
On Thu, Aug 26, 2021 at 8:22 PM Shiyang Ruan wrote: > > > > On 2021/8/23 20:57, Christoph Hellwig wrote: > > On Thu, Aug 19, 2021 at 03:54:01PM -0700, Dan Williams wrote: > >> > >> static void *dax_insert_entry(struct xa_state *xas, struct vm_fault *vmf, >

Re: [RFC v2 1/2] virtio-pmem: Async virtio-pmem flush

2021-08-25 Thread Dan Williams
On Wed, Aug 25, 2021 at 3:01 PM Pankaj Gupta wrote: > > > > Hi Dan, > > > > > > Thank you for the review. Please see my reply inline. > > > > > > > > Implement asynchronous flush for virtio pmem using work queue > > > > > to solve the preflush ordering issue. Also, coalesce the flush > > > > >

Re: [RFC v2 1/2] virtio-pmem: Async virtio-pmem flush

2021-08-25 Thread Dan Williams
On Wed, Aug 25, 2021 at 1:02 PM Pankaj Gupta wrote: > > Hi Dan, > > Thank you for the review. Please see my reply inline. > > > > Implement asynchronous flush for virtio pmem using work queue > > > to solve the preflush ordering issue. Also, coalesce the flush > > > requests when a flush is

Re: [RFC v2 1/2] virtio-pmem: Async virtio-pmem flush

2021-08-25 Thread Dan Williams
On Sun, Jul 25, 2021 at 11:09 PM Pankaj Gupta wrote: > > From: Pankaj Gupta > > Implement asynchronous flush for virtio pmem using work queue > to solve the preflush ordering issue. Also, coalesce the flush > requests when a flush is already in process. > > Signed-off-by: Pankaj Gupta > --- >

Re: [PATCH] pmem: fix the crash when unbind namespaces

2021-08-24 Thread Dan Williams
On Sun, Aug 22, 2021 at 4:49 AM wrote: > > From: sumiyawang > > kernel will crash when use after free the ioremap space, > which is triggered by ndctl destroy-namespace while some IO operations > exist. > The sequence of pmem driver release chain should be changed: > freeze the queue and wait io

Re: [PATCH v7 7/8] fsdax: Introduce dax_iomap_ops for end of reflink

2021-08-20 Thread Dan Williams
On Thu, Aug 19, 2021 at 11:13 PM ruansy.fnst wrote: > > > > On 2021/8/20 上午11:01, Dan Williams wrote: > > On Sun, Aug 15, 2021 at 11:05 PM Shiyang Ruan > > wrote: > >> > >> After writing data, reflink requires end operations to remap those new > &

Re: [PATCH -next v2] tools/testing/nvdimm: Make symbol '__nfit_test_ioremap' static

2021-04-20 Thread Dan Williams
On Tue, Apr 20, 2021 at 12:31 AM Zou Wei wrote: > > The sparse tool complains as follows: > > tools/testing/nvdimm/test/iomap.c:65:14: warning: > symbol '__nfit_test_ioremap' was not declared. Should it be static? > > This symbol is not used outside of iomap.c, so this > commit marks it static.

Re: [PATCH v2 1/1] x86/tdx: Add __tdcall() and __tdvmcall() helper functions

2021-04-20 Thread Dan Williams
On Tue, Apr 20, 2021 at 4:12 PM Kuppuswamy, Sathyanarayanan wrote: [..] > >>> Also, do you *REALLY* need to do this from assembly? Can't it be done > >>> in the C wrapper? > >> Its common for all use cases of TDVMCALL (vendor specific, in/out, etc). > >> so added > >> it here. > > Can I ask a

Re: [PATCH][RFC] tracing: Enable tracepoints via module parameters

2021-04-20 Thread Dan Williams
On Tue, Apr 20, 2021 at 5:55 AM Steven Rostedt wrote: [..] > > > So yes, function tracing now allows setting a filter to trace only the > > > functions for a given module, and if that module is not yet loaded, it > > > stores the filter until it is. > > > > Ah, thanks for the pointer. So if I

Re: [PATCH] libnvdimm.h: Remove duplicate struct declaration

2021-04-20 Thread Dan Williams
On Tue, Apr 20, 2021 at 6:39 AM Santosh Sivaraj wrote: > > Hi Ira, > > Ira Weiny writes: > > > On Mon, Apr 19, 2021 at 07:27:25PM +0800, Wan Jiabing wrote: > >> struct device is declared at 133rd line. > >> The declaration here is unnecessary. Remove it. > >> > >> Signed-off-by: Wan Jiabing >

Re: [PATCH][RFC] tracing: Enable tracepoints via module parameters

2021-04-19 Thread Dan Williams
On Mon, Apr 19, 2021 at 3:11 PM Steven Rostedt wrote: > > On Mon, 19 Apr 2021 21:54:13 + > "Williams, Dan J" wrote: > > > [ drop Rusty, add Jessica and Emmanuel ] > > Probably could have kept Jessica on as she's the module maintainer. Oh, you misread, I swapped out Rusty for Jessica on the

Re: [PATCH] mm/memory-failure: unecessary amount of unmapping

2021-04-19 Thread Dan Williams
ary/ > > Fixes: 6100e34b2526e ("mm, memory_failure: Teach memory_failure() about > dev_pagemap pages") > Signed-off-by: Jane Chu Other than changelog fixup, looks good. Reviewed-by: Dan Williams > --- > mm/memory-failure.c | 2 +- > 1 file changed, 1 insertion(+), 1 de

Re: [PATCH][v2] dax: Fix missed wakeup during dax entry invalidation

2021-04-19 Thread Dan Williams
On Mon, Apr 19, 2021 at 11:45 AM Vivek Goyal wrote: > > This is V2 of the patch. Posted V1 here. > > https://lore.kernel.org/linux-fsdevel/20210416173524.ga1379...@redhat.com/ > > Based on feedback from Dan and Jan, modified the patch to wake up > all waiters when dax entry is invalidated. This

[GIT PULL] libnvdimm fixes for v5.12-rc8 / final

2021-04-16 Thread Dan Williams
Arnd Bergmann (1): dax: avoid -Wempty-body warnings Dan Williams (2): libnvdimm: Notify disk drivers to revalidate region read-only Merge branch 'for-5.12/dax' into libnvdimm-fixes Vaibhav Jain (1): libnvdimm/region: Fix nvdimm_has_flush() to handle ND_REGION_ASYNC

[GIT PULL] cxl fixes for v5.12-rc8 / final

2021-04-16 Thread Dan Williams
sysfs. - Use the recommended sysfs helper for attribute 'show' implementations. Ben Widawsky (1): cxl/mem: Fix register block offset calculation Dan Williams (5): cxl/mem: Use sysfs_emit() for attribute show routines

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

2021-04-16 Thread Dan Williams
Signed-off-by: Dan Williams --- drivers/cxl/mem.c |7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/drivers/cxl/mem.c b/drivers/cxl/mem.c index 1b5078311f7d..2acc6173da36 100644 --- a/drivers/cxl/mem.c +++ b/drivers/cxl/mem.c @@ -4,6 +4,7 @@ #include #include

Re: [PATCH v1 1/1] libnvdimm: Don't use GUID APIs against raw buffer

2021-04-16 Thread Dan Williams
On Fri, Apr 16, 2021 at 1:42 PM Andy Shevchenko wrote: > > On Fri, Apr 16, 2021 at 01:08:06PM -0700, Dan Williams wrote: > > [ add Erik ] > > > > On Fri, Apr 16, 2021 at 10:36 AM Andy Shevchenko > > wrote: > > > > > > On Thu, Apr 15,

Re: [PATCH v1 1/1] libnvdimm: Don't use GUID APIs against raw buffer

2021-04-16 Thread Dan Williams
[ add Erik ] On Fri, Apr 16, 2021 at 10:36 AM Andy Shevchenko wrote: > > On Thu, Apr 15, 2021 at 05:37:54PM +0300, Andy Shevchenko wrote: > > Strictly speaking the comparison between guid_t and raw buffer > > is not correct. Return to plain memcmp() since the data structures > > haven't changed

Re: [PATCH] dax: Fix missed wakeup in put_unlocked_entry()

2021-04-16 Thread Dan Williams
On Fri, Apr 16, 2021 at 10:35 AM Vivek Goyal wrote: > > I am seeing missed wakeups which ultimately lead to a deadlock when I am > using virtiofs with DAX enabled and running "make -j". I had to mount > virtiofs as rootfs and also reduce to dax window size to 32M to reproduce > the problem

Re: [PATCH v1 1/1] ACPI: NFIT: Import GUID before use

2021-04-16 Thread Dan Williams
On Fri, Apr 16, 2021 at 10:34 AM Andy Shevchenko wrote: > > On Fri, Apr 16, 2021 at 09:15:34AM -0700, Dan Williams wrote: > > On Fri, Apr 16, 2021 at 1:58 AM Andy Shevchenko > > wrote: > > > On Fri, Apr 16, 2021 at 8:28 AM Dan Williams > > > wrote: > >

Re: [PATCH v1 1/1] ACPI: NFIT: Import GUID before use

2021-04-16 Thread Dan Williams
On Fri, Apr 16, 2021 at 1:58 AM Andy Shevchenko wrote: > > On Fri, Apr 16, 2021 at 8:28 AM Dan Williams wrote: > > > > On Thu, Apr 15, 2021 at 6:59 AM Andy Shevchenko > > wrote: > > > > > > Strictly speaking the comparison between guid_t and ra

Re: [PATCH v1 1/1] ACPI: NFIT: Import GUID before use

2021-04-15 Thread Dan Williams
On Thu, Apr 15, 2021 at 6:59 AM Andy Shevchenko wrote: > > Strictly speaking the comparison between guid_t and raw buffer > is not correct. Import GUID to variable of guid_t type and then > compare. Hmm, what about something like the following instead, because it adds safety. Any concerns about

Re: [PATCH v4] kernel/resource: Fix locking in request_free_mem_region

2021-04-15 Thread Dan Williams
On Thu, Apr 15, 2021 at 7:58 PM Alistair Popple wrote: > > request_free_mem_region() is used to find an empty range of physical > addresses for hotplugging ZONE_DEVICE memory. It does this by iterating > over the range of possible addresses using region_intersects() to see if > the range is free.

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

2021-04-15 Thread Dan Williams
On Thu, Apr 15, 2021 at 4:26 PM 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

Re: [PATCH 7/7] cxl: Add HDM decoder capbilities

2021-04-15 Thread Dan Williams
On Thu, Apr 15, 2021 at 4:50 PM Ben Widawsky wrote: > > Thanks for looking. Mostly trivial agreements or disagreements which I don't > care much about, but I'd really like you to focus on the last point, please. > > On 21-04-15 16:27:14, Dan Williams wrote: > > On Wed, Apr 7

Re: [PATCH 1/3] cxl/mem: Fix register block offset calculation

2021-04-15 Thread Dan Williams
On Thu, Apr 15, 2021 at 4:26 PM Ben Widawsky wrote: > > The offset for the register block should be a 64K aligned value, and > therefore FIELD_GET (which will shift) is not correct for the > calculation. > > From 8.1.9.1 of the CXL 2.0 spec: > A[31:16] of offset from the address contained by

Re: [PATCH 7/7] cxl: Add HDM decoder capbilities

2021-04-15 Thread Dan Williams
On Wed, Apr 7, 2021 at 3:26 PM Ben Widawsky wrote: > > An HDM decoder is defined in the CXL 2.0 specification as a mechanism > that allow devices and upstream ports to claim memory address ranges and > participate in interleave sets. HDM decoder registers are within the > component register block

Re: [PATCH 6/7] cxl/mem: Create a helper to setup device regs

2021-04-15 Thread Dan Williams
On Wed, Apr 7, 2021 at 3:26 PM Ben Widawsky wrote: > > Memory devices have a list of required register regions within the > register block, but this isn't required of all CXL components or > devices. To make things more tidy, and allow for easily setting up other > block types in this loop, the

Re: [PATCH v2 4/8] cxl/core: Refactor CXL register lookup for bridge reuse

2021-04-15 Thread Dan Williams
On Tue, Apr 6, 2021 at 10:47 AM Jonathan Cameron wrote: > > On Thu, 1 Apr 2021 07:31:03 -0700 > Dan Williams wrote: > > > While CXL Memory Device endpoints locate the CXL MMIO registers in a PCI > > BAR, CXL root bridges have their MMIO base address described by platfor

Re: [PATCH v2 5/8] cxl/acpi: Introduce ACPI0017 driver and cxl_root

2021-04-15 Thread Dan Williams
On Tue, Apr 6, 2021 at 10:47 AM Jonathan Cameron wrote: > > On Thu, 1 Apr 2021 07:31:09 -0700 > Dan Williams wrote: > > > While CXL builds upon the PCI software model for dynamic enumeration and > > control, a static platform component is required to bootstrap t

Re: [PATCH v2 7/8] cxl/port: Introduce cxl_port objects

2021-04-14 Thread Dan Williams
On Tue, Apr 13, 2021 at 6:15 PM Bjorn Helgaas wrote: > > On Thu, Apr 08, 2021 at 07:13:38PM -0700, Dan Williams wrote: > > Hi Bjorn, thanks for taking a look. > > > > On Thu, Apr 8, 2021 at 3:42 PM Bjorn Helgaas wrote: > > > > > > [+cc Gre

Re: [PATCH v2 1/8] cxl/mem: Move some definitions to mem.h

2021-04-13 Thread Dan Williams
On Tue, Apr 13, 2021 at 5:18 PM Dan Williams wrote: > > On Tue, Apr 6, 2021 at 10:47 AM Jonathan Cameron > wrote: > > > > On Thu, 1 Apr 2021 07:30:47 -0700 > > Dan Williams wrote: > > > > > In preparation for sharing cxl.h with other generic CX

Re: [PATCH v2 2/8] cxl/mem: Introduce 'struct cxl_regs' for "composable" CXL devices

2021-04-13 Thread Dan Williams
On Tue, Apr 6, 2021 at 10:47 AM Jonathan Cameron wrote: > > On Thu, 1 Apr 2021 07:30:53 -0700 > Dan Williams wrote: > > > CXL MMIO register blocks are organized by device type and capabilities. > > There are Component registers, Device registers (yes, an ambiguous >

Re: [PATCH v2 1/8] cxl/mem: Move some definitions to mem.h

2021-04-13 Thread Dan Williams
On Tue, Apr 6, 2021 at 10:47 AM Jonathan Cameron wrote: > > On Thu, 1 Apr 2021 07:30:47 -0700 > Dan Williams wrote: > > > In preparation for sharing cxl.h with other generic CXL consumers, > > move / consolidate some of the memory device specifics to mem.h. > >

Re: [PATCH v2 7/8] cxl/port: Introduce cxl_port objects

2021-04-13 Thread Dan Williams
On Thu, Apr 8, 2021 at 7:13 PM Dan Williams wrote: > > Hi Bjorn, thanks for taking a look. > > > On Thu, Apr 8, 2021 at 3:42 PM Bjorn Helgaas wrote: > > > > [+cc Greg, Rafael, Matthew: device model questions] > > > > Hi Dan, > > > > On Thu, A

Re: [RFC v1 00/26] Add TDX Guest Support

2021-04-12 Thread Dan Williams
On Sun, Apr 4, 2021 at 8:02 AM Dave Hansen wrote: > > It occurred to me that I've been doing a lot of digging in the TDX spec > lately. I think we can all agree that the "Architecture Specification" > is not the world's easiest, most disgestable reading. It's hard to > figure out what the Linux

Re: [PATCH v1] libnvdimm, dax: Fix a missing check in nd_dax_probe()

2021-04-09 Thread Dan Williams
On Fri, Apr 9, 2021 at 5:33 PM wrote: > > From: Yingjie Wang > > In nd_dax_probe(), nd_dax_alloc() may fail and return NULL. > Check for NULL before attempting to > use nd_dax to avoid a NULL pointer dereference. > > Fixes: c5ed9268643c ("libnvdimm, dax: autodetect support") > Signed-off-by:

Re: [PATCH v2 7/8] cxl/port: Introduce cxl_port objects

2021-04-08 Thread Dan Williams
Hi Bjorn, thanks for taking a look. On Thu, Apr 8, 2021 at 3:42 PM Bjorn Helgaas wrote: > > [+cc Greg, Rafael, Matthew: device model questions] > > Hi Dan, > > On Thu, Apr 01, 2021 at 07:31:20AM -0700, Dan Williams wrote: > > Once the cxl_root is established then othe

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