summary refs log tree commit diff
path: root/mm/compaction.c
diff options
context:
space:
mode:
authorZhenhua Huang <quic_zhenhuah@quicinc.com>2022-09-07 16:01:13 +0800
committerAndrew Morton <akpm@linux-foundation.org>2022-10-03 14:03:03 -0700
commit0bba9af03d55d2cc1aa7616a8b9e522ceb49d180 (patch)
treea55d1fe90a935eadeb8720b842196b5064b8f5a5 /mm/compaction.c
parent61768a1b37c664faf028d925e6b7825768afcc00 (diff)
downloadlinux-0bba9af03d55d2cc1aa7616a8b9e522ceb49d180.tar.gz
mm/page_owner.c: remove redundant drain_all_pages
Remove an expensive and unnecessary operation as PCP pages are safely
skipped when reading page owner.PCP pages can be skipped because
PAGE_EXT_OWNER_ALLOCATED is cleared.

With draining PCP pages, these pages are moved to buddy list so they can
be identified as buddy pages and skipped quickly.  Although it improved
efficiency of PFN walker, the drain is guaranteed expensive that is
unlikely to be offset by a slight increase in efficiency when skipping
free pages.

PAGE_EXT_OWNER_ALLOCATED is cleared in the page owner reset path below:
	free_unref_page
		-> free_unref_page_prepare
			-> free_pcp_prepare
				-> free_pages_prepare which do page owner
				reset
		-> free_unref_page_commit which add pages into pcp list

Link: https://lkml.kernel.org/r/1662704326-15899-1-git-send-email-quic_zhenhuah@quicinc.com
Link: https://lkml.kernel.org/r/1662633204-10044-1-git-send-email-quic_zhenhuah@quicinc.com
Link: https://lkml.kernel.org/r/1662537673-9392-1-git-send-email-quic_zhenhuah@quicinc.com
Signed-off-by: Zhenhua Huang <quic_zhenhuah@quicinc.com>
Acked-by: Mel Gorman <mgorman@techsingularity.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'mm/compaction.c')
0 files changed, 0 insertions, 0 deletions