mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-11-01 08:58:07 +00:00
mm: vmscan: reset sc->priority on retry
The commit 6be5e186fd65 ("mm: vmscan: restore incremental cgroup iteration") added a retry reclaim heuristic to iterate all the cgroups before returning an unsuccessful reclaim but missed to reset the sc->priority. Let's fix it. Link: https://lkml.kernel.org/r/20240529154911.3008025-1-shakeel.butt@linux.dev Fixes: 6be5e186fd65 ("mm: vmscan: restore incremental cgroup iteration") Signed-off-by: Shakeel Butt <shakeel.butt@linux.dev> Reported-by: syzbot+17416257cb95200cba44@syzkaller.appspotmail.com Tested-by: syzbot+17416257cb95200cba44@syzkaller.appspotmail.com Reviewed-by: Roman Gushchin <roman.gushchin@linux.dev> Cc: Johannes Weiner <hannes@cmpxchg.org> Cc: Michal Hocko <mhocko@kernel.org> Cc: Rik van Riel <riel@surriel.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
This commit is contained in:
parent
b82b530740
commit
462966dc7d
1 changed files with 1 additions and 0 deletions
|
@ -6304,6 +6304,7 @@ static unsigned long do_try_to_free_pages(struct zonelist *zonelist,
|
|||
* meaningful forward progress. Avoid false OOMs in this case.
|
||||
*/
|
||||
if (!sc->memcg_full_walk) {
|
||||
sc->priority = initial_priority;
|
||||
sc->memcg_full_walk = 1;
|
||||
goto retry;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue