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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




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@xxxxxxxxxx>
Cc: Michael Ellerman <mpe@xxxxxxxxxxxxxx>
Cc: Benjamin Herrenschmidt <benh@xxxxxxxxxxxxxxxxxxx>
Cc: Dan Williams <dan.j.williams@xxxxxxxxx>
Cc: Vishal Verma <vishal.l.verma@xxxxxxxxx>
Cc: Dave Jiang <dave.jiang@xxxxxxxxx>
Cc: Ben Skeggs <bskeggs@xxxxxxxxxx>
Cc: David Airlie <airlied@xxxxxxxx>
Cc: Daniel Vetter <daniel@xxxxxxxx>
Cc: Ira Weiny <ira.weiny@xxxxxxxxx>
Cc: Jason Gunthorpe <jgg@xxxxxxxxxxxx>
Signed-off-by: Dan Williams <dan.j.williams@xxxxxxxxx>
---
  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?




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux