Commit bdbe1d7
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>1 parent bf06901 commit bdbe1d7
1 file changed
Lines changed: 6 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
504 | 504 | | |
505 | 505 | | |
506 | 506 | | |
507 | | - | |
| 507 | + | |
| 508 | + | |
508 | 509 | | |
509 | 510 | | |
510 | | - | |
| 511 | + | |
| 512 | + | |
511 | 513 | | |
| 514 | + | |
512 | 515 | | |
513 | 516 | | |
514 | 517 | | |
515 | 518 | | |
516 | 519 | | |
517 | 520 | | |
| 521 | + | |
518 | 522 | | |
519 | 523 | | |
520 | 524 | | |
| |||
0 commit comments