lkml.org 
[lkml]   [2020]   [Jul]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH v2 19/22] mm/memremap_pages: Convert to 'struct range'
From
Date

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 multi-range extension of
> devm_memremap_pages().
>
> The bulk of this change is unwinding all the places internal to
> libnvdimm that used 'struct resource' unnecessarily.
>
> P2PDMA had a minor usage of the flags field, but only to report failures
> with "%pR". That is replaced with an open coded print of the range.
>
> Cc: Paul Mackerras <paulus@ozlabs.org>
> Cc: Michael Ellerman <mpe@ellerman.id.au>
> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
> Cc: Dan Williams <dan.j.williams@intel.com>
> Cc: Vishal Verma <vishal.l.verma@intel.com>
> Cc: Dave Jiang <dave.jiang@intel.com>
> Cc: Ben Skeggs <bskeggs@redhat.com>
> Cc: David Airlie <airlied@linux.ie>
> Cc: Daniel Vetter <daniel@ffwll.ch>
> Cc: Ira Weiny <ira.weiny@intel.com>
> Cc: Jason Gunthorpe <jgg@mellanox.com>
> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
> ---
> arch/powerpc/kvm/book3s_hv_uvmem.c | 13 +++--
> drivers/dax/bus.c | 10 ++--
> drivers/dax/bus.h | 2 -
> drivers/dax/dax-private.h | 5 --
> drivers/dax/device.c | 3 -
> drivers/dax/hmem/hmem.c | 5 ++
> drivers/dax/pmem/core.c | 12 ++---
> drivers/gpu/drm/nouveau/nouveau_dmem.c | 3 +
> drivers/nvdimm/badrange.c | 26 +++++------
> drivers/nvdimm/claim.c | 13 +++--
> drivers/nvdimm/nd.h | 3 +
> drivers/nvdimm/pfn_devs.c | 12 ++---
> drivers/nvdimm/pmem.c | 26 ++++++-----
> drivers/nvdimm/region.c | 21 +++++----
> drivers/pci/p2pdma.c | 11 ++---
> include/linux/memremap.h | 5 +-
> include/linux/range.h | 6 ++
> mm/memremap.c | 77 ++++++++++++++++----------------
> tools/testing/nvdimm/test/iomap.c | 2 -
> 19 files changed, 135 insertions(+), 120 deletions(-)

I think you are missing a call to memremap_pages() in lib/test_hmm.c
and a call to release_mem_region() that need to be converted too.
Try setting CONFIG_TEST_HMM=m.

Also, what about the call to release_mem_region() in
drivers/gpu/drm/nouveau/nouveau_dmem.c? Doesn't that need a small change too?

\
 
 \ /
  Last update: 2020-07-13 18:36    [W:0.176 / U:2.204 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site