Skip to content

Commit

Permalink
mglru: mm/vmscan.c: fix imprecise comments
Browse files Browse the repository at this point in the history
Link: https://lkml.kernel.org/r/[email protected]
Signed-off-by: Yu Zhao <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
  • Loading branch information
yuzhaogoogle authored and akpm00 committed Oct 7, 2022
1 parent 14aa8b2 commit e4fea72
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions mm/vmscan.c
Original file line number Diff line number Diff line change
Expand Up @@ -5076,7 +5076,7 @@ static bool should_abort_scan(struct lruvec *lruvec, unsigned long seq,
DEFINE_MAX_SEQ(lruvec);

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

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

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

0 comments on commit e4fea72

Please sign in to comment.