Skip to content

Commit e4fea72

Browse files
Yu Zhaoakpm00
authored andcommitted
mglru: mm/vmscan.c: fix imprecise comments
Link: https://lkml.kernel.org/r/[email protected] Signed-off-by: Yu Zhao <[email protected]> Signed-off-by: Andrew Morton <[email protected]>
1 parent 14aa8b2 commit e4fea72

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

mm/vmscan.c

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5076,7 +5076,7 @@ static bool should_abort_scan(struct lruvec *lruvec, unsigned long seq,
50765076
DEFINE_MAX_SEQ(lruvec);
50775077

50785078
if (!current_is_kswapd()) {
5079-
/* age each memcg once to ensure fairness */
5079+
/* age each memcg at most once to ensure fairness */
50805080
if (max_seq - seq > 1)
50815081
return true;
50825082

@@ -5101,10 +5101,9 @@ static bool should_abort_scan(struct lruvec *lruvec, unsigned long seq,
51015101

51025102
/*
51035103
* A minimum amount of work was done under global memory pressure. For
5104-
* kswapd, it may be overshooting. For direct reclaim, the target isn't
5105-
* met, and yet the allocation may still succeed, since kswapd may have
5106-
* caught up. In either case, it's better to stop now, and restart if
5107-
* necessary.
5104+
* kswapd, it may be overshooting. For direct reclaim, the allocation
5105+
* may succeed if all suitable zones are somewhat safe. In either case,
5106+
* it's better to stop now, and restart later if necessary.
51085107
*/
51095108
for (i = 0; i <= sc->reclaim_idx; i++) {
51105109
unsigned long wmark;

0 commit comments

Comments
 (0)