[PATCH] mm/mremap_pages: Fix static key devmap_managed_key updates

2020-10-23 Thread Ralph Campbell
0025c1fd80] [c003a430] system_call_exception+0x120/0x270 [c00025c1fe20] [c000c540] system_call_common+0xf0/0x27c Cc: Christoph Hellwig Cc: Dan Williams Cc: linux-nvdimm@lists.01.org Cc: Jason Gunthorpe Signed-off-by: Ralph Campbell Reported-by: Aneesh Kumar K.V Reviewed-

Re: [PATCH] mm/mremap_pages: Fix static key devmap_managed_key updates

2020-10-23 Thread Ralph Campbell
On 10/22/20 11:46 PM, Christoph Hellwig wrote: On Thu, Oct 22, 2020 at 11:19:43AM -0700, Ralph Campbell wrote: On 10/22/20 8:41 AM, Ira Weiny wrote: On Thu, Oct 22, 2020 at 11:37:53AM +0530, Aneesh Kumar K.V wrote: commit 6f42193fd86e ("memremap: don't use a separate devm a

Re: [PATCH] mm/mremap_pages: Fix static key devmap_managed_key updates

2020-10-22 Thread Ralph Campbell
_DEV_PAGEMAP_OPS isn't defined. I have only compile tested the following. Signed-off-by: Ralph Campbell --- mm/memremap.c | 39 --- 1 file changed, 16 insertions(+), 23 deletions(-) diff --git a/mm/memremap.c b/mm/memremap.c index 73a206d0f645..16b2fb482da1

[PATCH v2] ext4/xfs: add page refcount helper

2020-10-07 Thread Ralph Campbell
There are several places where ZONE_DEVICE struct pages assume a reference count == 1 means the page is idle and free. Instead of open coding this, add helper functions to hide this detail. Signed-off-by: Ralph Campbell Reviewed-by: Christoph Hellwig Acked-by: Darrick J. Wong Acked

Re: [PATCH] ext4/xfs: add page refcount helper

2020-10-07 Thread Ralph Campbell
On 10/7/20 1:25 AM, Jan Kara wrote: On Tue 06-10-20 16:09:30, Ralph Campbell wrote: There are several places where ZONE_DEVICE struct pages assume a reference count == 1 means the page is idle and free. Instead of open coding this, add a helper function to hide this detail. Signed-off

[PATCH] ext4/xfs: add page refcount helper

2020-10-06 Thread Ralph Campbell
There are several places where ZONE_DEVICE struct pages assume a reference count == 1 means the page is idle and free. Instead of open coding this, add a helper function to hide this detail. Signed-off-by: Ralph Campbell Reviewed-by: Christoph Hellwig --- I'm resending this as a separate patch

Re: [PATCH v2 19/22] mm/memremap_pages: Convert to 'struct range'

2020-07-13 Thread Ralph Campbell
On 7/12/20 9:27 AM, Dan Williams wrote: The 'struct resource' in 'struct dev_pagemap' is only used for holding resource span information. The other fields, 'name', 'flags', 'desc', 'parent', 'sibling', and 'child' are all unused wasted space. This is in preparation for introducing a

Re: [PATCH v6] mm/pgmap: Use correct alignment when looking at first pfn from a region

2019-09-17 Thread Ralph Campbell
On 9/17/19 8:31 AM, Aneesh Kumar K.V wrote: vmem_altmap_offset() adjust the section aligned base_pfn offset. So we need to make sure we account for the same when computing base_pfn. ie, for altmap_valid case, our pfn_first should be: pfn_first = altmap->base_pfn + vmem_altmap_offset(altmap);

Re: [PATCH 20/22] mm: move hmm_vma_fault to nouveau

2019-07-03 Thread Ralph Campbell
/ fixing a locking bug involving caller and callee. Signed-off-by: Christoph Hellwig I see where you are going with this and it looks like straightforward code movement so, Reviewed-by: Ralph Campbell --- drivers/gpu/drm/nouveau/nouveau_svm.c | 54 ++- include/l

Re: [PATCH 19/22] mm: always return EBUSY for invalid ranges in hmm_range_{fault,snapshot}

2019-07-03 Thread Ralph Campbell
-by: Christoph Hellwig Reviewed-by: Ralph Campbell Probably should update the "Return:" comment above hmm_range_snapshot() too. --- mm/hmm.c | 8 +++- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/mm/hmm.c b/mm/hmm.c index c85ed7d4e2ce..d125df698e2b 100644 ---

Re: [PATCH 18/22] mm: return valid info from hmm_range_unregister

2019-07-03 Thread Ralph Campbell
oph Hellwig Reviewed-by: Ralph Campbell --- drivers/gpu/drm/nouveau/nouveau_svm.c | 2 +- include/linux/hmm.h | 11 +-- mm/hmm.c | 6 +- 3 files changed, 7 insertions(+), 12 deletions(-) diff --git a/drivers/gpu/drm/nouv

Re: [PATCH 10/22] memremap: add a migrate callback to struct dev_pagemap_ops

2019-06-13 Thread Ralph Campbell
page(entry); + ret = page->pgmap->ops->migrate(vmf); This needs to either initialize "page" or be changed to "vmf->page". Otherwise, it is a NULL pointer dereference. } else if (is_hwpoison_entry(entry)) { re

Re: [PATCH 18/22] mm: mark DEVICE_PUBLIC as broken

2019-06-13 Thread Ralph Campbell
On 6/13/19 12:44 PM, Jason Gunthorpe wrote: On Thu, Jun 13, 2019 at 11:43:21AM +0200, Christoph Hellwig wrote: The code hasn't been used since it was added to the tree, and doesn't appear to actually be usable. Mark it as BROKEN until either a user comes along or we finally give up on it.

Re: [PATCH v6 04/12] mm/hotplug: Prepare shrink_{zone, pgdat}_span for sub-section removal

2019-04-19 Thread Ralph Campbell
Just noticed this by inspection. I can't say I'm very familiar with the code. On 4/17/19 11:39 AM, Dan Williams wrote: Sub-section hotplug support reduces the unit of operation of hotplug from section-sized-units (PAGES_PER_SECTION) to sub-section-sized units (PAGES_PER_SUBSECTION). Teach