Commit 3465074
mm/mglru: use the common routine for dirty/writeback reactivation
Currently MGLRU will move the dirty writeback folios to the second
oldest gen instead of reactivate them like the classical LRU. This
might help to reduce the LRU contention as it skipped the isolation.
But as a result we will see these folios at the LRU tail more frequently
leading to inefficient reclaim.
Besides, the dirty / writeback check after isolation in
shrink_folio_list is more accurate and covers more cases. So instead,
just drop the special handling for dirty writeback, use the common
routine and re-activate it like the classical LRU.
This should in theory improve the scan efficiency. These folios will be
rotated back to LRU tail once writeback is done so there is no risk of
hotness inversion. And now each reclaim loop will have a higher
success rate. This also prepares for unifying the writeback and
throttling mechanism with classical LRU, we keep these folios far from
tail so detecting the tail batch will have a similar pattern with
classical LRU.
The micro optimization that avoids LRU contention by skipping the
isolation is gone, which should be fine. Compared to IO and writeback
cost, the isolation overhead is trivial.
Reviewed-by: Axel Rasmussen <axelrasmussen@google.com>
Signed-off-by: Kairui Song <kasong@tencent.com>1 parent 6d1e871 commit 3465074
1 file changed
Lines changed: 0 additions & 19 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4437 | 4437 | | |
4438 | 4438 | | |
4439 | 4439 | | |
4440 | | - | |
4441 | 4440 | | |
4442 | 4441 | | |
4443 | 4442 | | |
| |||
4487 | 4486 | | |
4488 | 4487 | | |
4489 | 4488 | | |
4490 | | - | |
4491 | | - | |
4492 | | - | |
4493 | | - | |
4494 | | - | |
4495 | | - | |
4496 | | - | |
4497 | | - | |
4498 | | - | |
4499 | | - | |
4500 | | - | |
4501 | | - | |
4502 | | - | |
4503 | | - | |
4504 | | - | |
4505 | 4489 | | |
4506 | 4490 | | |
4507 | 4491 | | |
| |||
4523 | 4507 | | |
4524 | 4508 | | |
4525 | 4509 | | |
4526 | | - | |
4527 | | - | |
4528 | | - | |
4529 | 4510 | | |
4530 | 4511 | | |
4531 | 4512 | | |
| |||
0 commit comments