Commit ca7eaeb
filemap: batch PTE mappings
Call set_pte_range() once per contiguous range of the folio instead of
once per page. This batches the updates to mm counters and the rmap.
With a will-it-scale.page_fault3 like app (change file write fault testing
to read fault testing. Trying to upstream it to will-it-scale at [1]) got
15% performance gain on a 48C/96T Cascade Lake test box with 96 processes
running against xfs.
Perf data collected before/after the change:
18.73%--page_add_file_rmap
|
--11.60%--__mod_lruvec_page_state
|
|--7.40%--__mod_memcg_lruvec_state
| |
| --5.58%--cgroup_rstat_updated
|
--2.53%--__mod_lruvec_state
|
--1.48%--__mod_node_page_state
9.93%--page_add_file_rmap_range
|
--2.67%--__mod_lruvec_page_state
|
|--1.95%--__mod_memcg_lruvec_state
| |
| --1.57%--cgroup_rstat_updated
|
--0.61%--__mod_lruvec_state
|
--0.54%--__mod_node_page_state
The running time of __mode_lruvec_page_state() is reduced about 9%.
[1]: antonblanchard/will-it-scale#37
Link: https://lkml.kernel.org/r/[email protected]
Signed-off-by: Yin Fengwei <[email protected]>
Signed-off-by: Matthew Wilcox (Oracle) <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>1 parent 1c9a1e9 commit ca7eaeb
1 file changed
+29
-14
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3480 | 3480 | | |
3481 | 3481 | | |
3482 | 3482 | | |
3483 | | - | |
| 3483 | + | |
| 3484 | + | |
3484 | 3485 | | |
3485 | 3486 | | |
3486 | | - | |
3487 | | - | |
| 3487 | + | |
| 3488 | + | |
3488 | 3489 | | |
3489 | 3490 | | |
3490 | 3491 | | |
| |||
3494 | 3495 | | |
3495 | 3496 | | |
3496 | 3497 | | |
3497 | | - | |
3498 | | - | |
3499 | | - | |
3500 | | - | |
3501 | | - | |
| 3498 | + | |
| 3499 | + | |
3502 | 3500 | | |
3503 | | - | |
3504 | | - | |
3505 | | - | |
| 3501 | + | |
| 3502 | + | |
| 3503 | + | |
| 3504 | + | |
| 3505 | + | |
| 3506 | + | |
| 3507 | + | |
| 3508 | + | |
| 3509 | + | |
3506 | 3510 | | |
3507 | | - | |
3508 | | - | |
| 3511 | + | |
| 3512 | + | |
| 3513 | + | |
| 3514 | + | |
| 3515 | + | |
| 3516 | + | |
| 3517 | + | |
| 3518 | + | |
| 3519 | + | |
| 3520 | + | |
| 3521 | + | |
| 3522 | + | |
| 3523 | + | |
3509 | 3524 | | |
3510 | | - | |
| 3525 | + | |
3511 | 3526 | | |
3512 | 3527 | | |
3513 | 3528 | | |
| |||
0 commit comments