linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [RFC 0/4] mm: Remove pfn_t type
@ 2025-01-08  1:18 Alistair Popple
  2025-01-08  1:18 ` [RFC 1/4] mm: Remove PFN_MAP, PFN_SG_CHAIN and PFN_SG_LAST Alistair Popple
                   ` (4 more replies)
  0 siblings, 5 replies; 10+ messages in thread
From: Alistair Popple @ 2025-01-08  1:18 UTC (permalink / raw)
  To: akpm, linux-mm
  Cc: Alistair Popple, gerald.schaefer, dan.j.williams, jgg, willy,
	david, linux-kernel, nvdimm, linux-fsdevel, linux-ext4,
	linux-xfs, jhubbard, hch

Once my series[1] and Dan's cleanup[2] is merged all users of DAX will
require a ZONE_DEVICE page which is properly refcounted.  This means there
is no longer any need for the PFN_DEV and PFN_MAP flags. Furthermore the
PFN_SG_CHAIN and PFN_SG_LAST flags never appear to have been used. It is
therefore possible to remove the pfn_t type and replace any usage with raw
pfns.

The remaining users of PFN_DEV have simply passed this to
vmf_insert_mixed(), however once my series is merged vmf_insert_mixed()
doesn't need these flags anyway so those users can be trivially converted
to using raw pfns.

Note that this RFC has only been lightly build tested. Also the third patch
probably needs further splitting up. I have pushed a tree with this, along
with the prerequisite series, to
https://github.com/apopple/linux/tree/pfn_t_cleanup

[1] - https://lore.kernel.org/linux-mm/cover.425da7c4e76c2749d0ad1734f972b06114e02d52.1736221254.git-series.apopple@nvidia.com/
[2] - https://lore.kernel.org/linux-mm/172721874675.497781.3277495908107141898.stgit@dwillia2-xfh.jf.intel.com/

---

Cc: gerald.schaefer@linux.ibm.com
Cc: dan.j.williams@intel.com
Cc: jgg@ziepe.ca
Cc: willy@infradead.org
Cc: david@redhat.com
Cc: linux-kernel@vger.kernel.org
Cc: nvdimm@lists.linux.dev
Cc: linux-fsdevel@vger.kernel.org
Cc: linux-mm@kvack.org
Cc: linux-ext4@vger.kernel.org
Cc: linux-xfs@vger.kernel.org
Cc: jhubbard@nvidia.com
Cc: hch@lst.de

Alistair Popple (4):
  mm: Remove PFN_MAP, PFN_SG_CHAIN and PFN_SG_LAST
  mm: Remove uses of PFN_DEV
  mm: Remove callers of pfn_t functionality
  mm: Remove include/linux/pfn_t.h

 arch/x86/mm/pat/memtype.c                |  6 +-
 drivers/dax/device.c                     | 23 ++----
 drivers/dax/hmem/hmem.c                  |  1 +-
 drivers/dax/kmem.c                       |  1 +-
 drivers/dax/pmem.c                       |  1 +-
 drivers/dax/super.c                      |  3 +-
 drivers/gpu/drm/exynos/exynos_drm_gem.c  |  1 +-
 drivers/gpu/drm/gma500/fbdev.c           |  3 +-
 drivers/gpu/drm/i915/gem/i915_gem_mman.c |  1 +-
 drivers/gpu/drm/msm/msm_gem.c            |  1 +-
 drivers/gpu/drm/omapdrm/omap_gem.c       |  7 +--
 drivers/gpu/drm/v3d/v3d_bo.c             |  1 +-
 drivers/md/dm-linear.c                   |  2 +-
 drivers/md/dm-log-writes.c               |  2 +-
 drivers/md/dm-stripe.c                   |  2 +-
 drivers/md/dm-target.c                   |  2 +-
 drivers/md/dm-writecache.c               |  9 +--
 drivers/md/dm.c                          |  2 +-
 drivers/nvdimm/pmem.c                    |  8 +--
 drivers/nvdimm/pmem.h                    |  4 +-
 drivers/s390/block/dcssblk.c             | 10 +--
 drivers/vfio/pci/vfio_pci_core.c         |  7 +--
 fs/cramfs/inode.c                        |  4 +-
 fs/dax.c                                 | 45 +++++-------
 fs/ext4/file.c                           |  2 +-
 fs/fuse/dax.c                            |  3 +-
 fs/fuse/virtio_fs.c                      |  5 +-
 fs/xfs/xfs_file.c                        |  2 +-
 include/linux/dax.h                      |  8 +-
 include/linux/device-mapper.h            |  2 +-
 include/linux/huge_mm.h                  |  4 +-
 include/linux/mm.h                       |  4 +-
 include/linux/pfn.h                      | 10 +---
 include/linux/pfn_t.h                    | 96 +-------------------------
 include/linux/pgtable.h                  |  4 +-
 include/trace/events/fs_dax.h            |  6 +--
 mm/debug_vm_pgtable.c                    |  1 +-
 mm/huge_memory.c                         | 23 +++---
 mm/memory.c                              | 32 +++-----
 mm/memremap.c                            |  1 +-
 mm/migrate.c                             |  1 +-
 tools/testing/nvdimm/pmem-dax.c          |  6 +-
 tools/testing/nvdimm/test/iomap.c        | 11 +---
 43 files changed, 108 insertions(+), 259 deletions(-)
 delete mode 100644 include/linux/pfn_t.h

base-commit: 47dc3422e9f51a38e4d5490937f798f080015756
-- 
git-series 0.9.1


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2025-01-08 19:37 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-01-08  1:18 [RFC 0/4] mm: Remove pfn_t type Alistair Popple
2025-01-08  1:18 ` [RFC 1/4] mm: Remove PFN_MAP, PFN_SG_CHAIN and PFN_SG_LAST Alistair Popple
2025-01-08  5:51   ` Christoph Hellwig
2025-01-08  1:18 ` [RFC 2/4] mm: Remove uses of PFN_DEV Alistair Popple
2025-01-08  5:51   ` Christoph Hellwig
2025-01-08  1:18 ` [RFC 3/4] mm: Remove callers of pfn_t functionality Alistair Popple
2025-01-08  5:53   ` Christoph Hellwig
2025-01-08  1:18 ` [RFC 4/4] mm: Remove include/linux/pfn_t.h Alistair Popple
2025-01-08  5:53   ` Christoph Hellwig
2025-01-08 19:36 ` [RFC 0/4] mm: Remove pfn_t type Dan Williams

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox