linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RFC v2 PATCH 0/3] mm: common PAGE_SIZE shift macros
@ 2021-09-19 13:12 Oleksandr Natalenko
  2021-09-19 13:12 ` [RFC v2 PATCH 1/3] mm: add PG2KB/KB2PG helper macros Oleksandr Natalenko
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Oleksandr Natalenko @ 2021-09-19 13:12 UTC (permalink / raw)
  To: linux-kernel
  Cc: linux-mm, Andrew Morton, Vlastimil Babka, Matthew Wilcox,
	Greg Kroah-Hartman, Miaohe Lin, Michal Hocko, Mel Gorman,
	Stephen Rothwell, David Laight

There are various places where the K(x) macro (or its alternative and/or
counterpart) is defined. This submission gets rid of multiple definitions
and provides common ones.

Based on discussion with Miaohe Lin [1].

The patch is based on top of next-20210910 and is compile-tested using
allyesconfig.

RFC v1: [2].

Changes since RFC v1:

* change name from K(x) to PG2KB(x)
* also provide KB2PG(x)
* replace open-coded variants
* do not use separate header file for macro definitions

[1] https://lore.kernel.org/linux-mm/9161665.bUqNH3lxUD@natalenko.name/
[2] https://lore.kernel.org/lkml/20210901092149.994791-1-oleksandr@natalenko.name/

Oleksandr Natalenko (3):
  mm: add PG2KB/KB2PG helper macros
  mm: replace custom PG2KB/KB2PG macros with common ones
  mm: replace open-coded PG2KB/KB2PG variants with macros

 arch/alpha/kernel/setup.c                     |  3 +-
 arch/arc/include/asm/arcregs.h                |  4 +-
 arch/mips/mm/init.c                           |  2 +-
 arch/powerpc/platforms/pseries/cmm.c          | 17 ++--
 arch/s390/appldata/appldata_mem.c             | 19 ++--
 arch/x86/kernel/cpu/mtrr/cleanup.c            | 17 ++--
 block/blk-sysfs.c                             |  9 +-
 drivers/base/node.c                           | 69 ++++++++-------
 drivers/gpu/drm/v3d/v3d_debugfs.c             |  3 +-
 drivers/gpu/drm/vmwgfx/vmwgfx_gmrid_manager.c |  5 +-
 drivers/md/md-bitmap.c                        |  4 +-
 drivers/scsi/mpt3sas/mpt3sas_base.c           |  5 +-
 drivers/xen/xen-balloon.c                     | 11 ++-
 fs/ceph/addr.c                                |  2 +-
 fs/ceph/super.h                               |  3 +-
 fs/fs-writeback.c                             |  2 +-
 fs/nfs/write.c                                |  4 +-
 fs/nfsd/nfscache.c                            |  3 +-
 fs/proc/meminfo.c                             |  4 +-
 fs/proc/task_mmu.c                            |  3 +-
 include/linux/mm.h                            |  3 +
 include/trace/events/writeback.h              | 19 ++--
 kernel/debug/kdb/kdb_main.c                   |  3 +-
 kernel/events/core.c                          |  2 +-
 kernel/fork.c                                 |  2 +-
 mm/backing-dev.c                              | 22 +++--
 mm/hugetlb.c                                  |  2 +-
 mm/memcontrol.c                               | 18 ++--
 mm/mmap.c                                     |  6 +-
 mm/nommu.c                                    |  4 +-
 mm/oom_kill.c                                 | 16 ++--
 mm/page-writeback.c                           |  4 +-
 mm/page_alloc.c                               | 86 +++++++++----------
 mm/shmem.c                                    |  3 +-
 mm/swap_state.c                               |  5 +-
 mm/swapfile.c                                 | 11 ++-
 mm/util.c                                     |  6 +-
 37 files changed, 197 insertions(+), 204 deletions(-)

-- 
2.33.0


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

end of thread, other threads:[~2021-09-19 14:22 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-19 13:12 [RFC v2 PATCH 0/3] mm: common PAGE_SIZE shift macros Oleksandr Natalenko
2021-09-19 13:12 ` [RFC v2 PATCH 1/3] mm: add PG2KB/KB2PG helper macros Oleksandr Natalenko
2021-09-19 13:21   ` Greg Kroah-Hartman
2021-09-19 14:21   ` Matthew Wilcox
2021-09-19 13:12 ` [RFC v2 PATCH 2/3] mm: replace custom PG2KB/KB2PG macros with common ones Oleksandr Natalenko
2021-09-19 13:12 ` [RFC v2 PATCH 3/3] mm: replace open-coded PG2KB/KB2PG variants with macros Oleksandr Natalenko

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).