Commit ed49f6f
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
Signed-off-by: Yin Fengwei <[email protected]>
Signed-off-by: Matthew Wilcox (Oracle) <[email protected]>1 parent 98a70b1 commit ed49f6f
1 file changed
+25
-11
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3486 | 3486 | | |
3487 | 3487 | | |
3488 | 3488 | | |
3489 | | - | |
| 3489 | + | |
| 3490 | + | |
3490 | 3491 | | |
3491 | 3492 | | |
3492 | | - | |
3493 | | - | |
| 3493 | + | |
| 3494 | + | |
3494 | 3495 | | |
3495 | 3496 | | |
3496 | 3497 | | |
| |||
3500 | 3501 | | |
3501 | 3502 | | |
3502 | 3503 | | |
3503 | | - | |
3504 | | - | |
| 3504 | + | |
| 3505 | + | |
3505 | 3506 | | |
3506 | 3507 | | |
3507 | 3508 | | |
3508 | 3509 | | |
3509 | | - | |
3510 | | - | |
3511 | | - | |
| 3510 | + | |
| 3511 | + | |
| 3512 | + | |
| 3513 | + | |
| 3514 | + | |
| 3515 | + | |
| 3516 | + | |
3512 | 3517 | | |
3513 | | - | |
3514 | | - | |
| 3518 | + | |
| 3519 | + | |
| 3520 | + | |
| 3521 | + | |
| 3522 | + | |
| 3523 | + | |
| 3524 | + | |
| 3525 | + | |
| 3526 | + | |
| 3527 | + | |
| 3528 | + | |
3515 | 3529 | | |
3516 | | - | |
| 3530 | + | |
3517 | 3531 | | |
3518 | 3532 | | |
3519 | 3533 | | |
| |||
0 commit comments