Commit 77bbf72
mm/mglru: relocate the LRU scan batch limit to callers
Same as active / inactive LRU, MGLRU isolates and scans folios in
batches. The batch split is done hidden deep in the helper, which
makes the code harder to follow. The helper's arguments are also
confusing since callers usually request more folios than the batch
size, so the helper almost never processes the full requested amount.
Move the batch splitting into the top loop to make it cleaner, there
should be no behavior change.
Reviewed-by: Axel Rasmussen <axelrasmussen@google.com>
Reviewed-by: Baolin Wang <baolin.wang@linux.alibaba.com>
Reviewed-by: Barry Song <baohua@kernel.org>
Signed-off-by: Kairui Song <kasong@tencent.com>1 parent 727bab3 commit 77bbf72
1 file changed
Lines changed: 9 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4554 | 4554 | | |
4555 | 4555 | | |
4556 | 4556 | | |
4557 | | - | |
4558 | | - | |
| 4557 | + | |
4559 | 4558 | | |
4560 | 4559 | | |
4561 | 4560 | | |
| 4561 | + | |
4562 | 4562 | | |
4563 | 4563 | | |
4564 | 4564 | | |
| |||
4615 | 4615 | | |
4616 | 4616 | | |
4617 | 4617 | | |
4618 | | - | |
| 4618 | + | |
4619 | 4619 | | |
4620 | 4620 | | |
4621 | 4621 | | |
| |||
4859 | 4859 | | |
4860 | 4860 | | |
4861 | 4861 | | |
4862 | | - | |
| 4862 | + | |
4863 | 4863 | | |
4864 | 4864 | | |
4865 | 4865 | | |
| |||
4870 | 4870 | | |
4871 | 4871 | | |
4872 | 4872 | | |
4873 | | - | |
| 4873 | + | |
| 4874 | + | |
4874 | 4875 | | |
4875 | 4876 | | |
4876 | 4877 | | |
| |||
5490 | 5491 | | |
5491 | 5492 | | |
5492 | 5493 | | |
| 5494 | + | |
5493 | 5495 | | |
5494 | 5496 | | |
5495 | 5497 | | |
| |||
5506 | 5508 | | |
5507 | 5509 | | |
5508 | 5510 | | |
5509 | | - | |
5510 | | - | |
| 5511 | + | |
| 5512 | + | |
5511 | 5513 | | |
5512 | 5514 | | |
5513 | 5515 | | |
| |||
0 commit comments