Skip to content

trim the uses of compound_head()

Yu Zhao linux-mm lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v2 Latest3 patches 10 repliesIn review

Changes in v2 from the cover letter

Removing compound_head() entirely from Page{Active,Unevictable} may not be the best option (for the moment) because there may be other cases that need compound_head().

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3mm: bypass compound_head() for PF_NO_TAIL when enforce=1include/linux/page-flags.h+1 -10 replies
2/3mm: use PF_NO_TAIL for PG_lruinclude/linux/page-flags.h+2 -21 reply
3/3mm: use PF_ONLY_HEAD for PG_active and PG_unevictablefs/proc/task_mmu.c include/linux/page-flags.h+7 -67 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.

Read the v2 thread

Cover letter [PATCH v2 0/3] trim the uses of compound_head()

Patch series "mm: lru related cleanups" starting at commit 42895ea73bcd ("mm/vmscan.c: use add_page_to_lru_list()") bloated vmlinux by 1777 bytes, according to:
https://lore.kernel.org/linux-mm/[email protected]/

It turned out many places inline Page{Active,Unevictable} which in turn include compound_head().

From the v1:
Removing compound_head() entirely from Page{Active,Unevictable} may not be the best option (for the moment) because there may be other cases that need compound_head().

In addition to picking a couple pieces of low-hanging fruit, this v2 removes compound_head() completely from Page{Active,Unevictable}.

bloat-o-meter result before and after the series:
add/remove: 0/0 grow/shrink: 6/92 up/down: 697/-7656 (-6959)

Yu Zhao (3):
mm: bypass compound_head() for PF_NO_TAIL when enforce=1
mm: use PF_NO_TAIL for PG_lru
mm: use PF_ONLY_HEAD for PG_active and PG_unevictable

 fs/proc/task_mmu.c         |  3 ++-
 include/linux/page-flags.h | 16 ++++++++--------
 2 files changed, 10 insertions(+), 9 deletions(-)
Signature · 1 line
2.30.1.766.gb4fecdf3b7-goog