From: Oleksandr Natalenko <oleksandr@natalenko.name>
To: linux-kernel@vger.kernel.org
Cc: linux-mm@kvack.org, Andrew Morton <akpm@linux-foundation.org>,
Vlastimil Babka <vbabka@suse.cz>,
Matthew Wilcox <willy@infradead.org>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Miaohe Lin <linmiaohe@huawei.com>,
Michal Hocko <mhocko@kernel.org>,
Mel Gorman <mgorman@techsingularity.net>,
Stephen Rothwell <sfr@canb.auug.org.au>,
David Laight <David.Laight@ACULAB.COM>
Subject: [RFC v2 PATCH 0/3] mm: common PAGE_SIZE shift macros
Date: Sun, 19 Sep 2021 15:12:45 +0200 [thread overview]
Message-ID: <20210919131248.489798-1-oleksandr@natalenko.name> (raw)
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
next reply other threads:[~2021-09-19 13:12 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-09-19 13:12 Oleksandr Natalenko [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210919131248.489798-1-oleksandr@natalenko.name \
--to=oleksandr@natalenko.name \
--cc=David.Laight@ACULAB.COM \
--cc=akpm@linux-foundation.org \
--cc=gregkh@linuxfoundation.org \
--cc=linmiaohe@huawei.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mgorman@techsingularity.net \
--cc=mhocko@kernel.org \
--cc=sfr@canb.auug.org.au \
--cc=vbabka@suse.cz \
--cc=willy@infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox