]> www.infradead.org Git - users/willy/pagecache.git/commit
mm/damon/paddr: increment pa_stat damon address range by folio size
authorUsama Arif <usamaarif642@gmail.com>
Mon, 13 Jan 2025 19:07:38 +0000 (19:07 +0000)
committerAndrew Morton <akpm@linux-foundation.org>
Sun, 26 Jan 2025 04:22:41 +0000 (20:22 -0800)
commitbdbe1d7bc325dbe77335f39b265620f9accc0ae9
treee709acb4c9f5d2d18a6a921b85cf70d891bb4962
parentbf069012df19cf80b460a03c92bfe6320dc268b0
mm/damon/paddr: increment pa_stat damon address range by folio size

This is to avoid going through all the pages in a folio.  For folio_size >
PAGE_SIZE, damon_get_folio will return NULL for tail pages, so the for
loop in those instances will be a nop.  Have a more efficient loop by just
incrementing the address by folio_size.

Link: https://lkml.kernel.org/r/20250113190738.1156381-1-usamaarif642@gmail.com
Signed-off-by: Usama Arif <usamaarif642@gmail.com>
Reviewed-by: SeongJae Park <sj@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
mm/damon/paddr.c