diff options
author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2020-09-14 10:07:08 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2020-09-14 10:07:08 +0200 |
commit | 05fa34dcdb34d2a496ef89d8f361ca697643edec (patch) | |
tree | 1d5bddce044e2646776c5a315eec4211be3f3410 /mm/vmscan.c | |
parent | f7dbcd17703157c0063c619714a765e3116caa83 (diff) | |
parent | 856deb866d16e29bd65952e0289066f6078af773 (diff) |
Merge 5.9-rc5 into char-misc-next
We want the char/misc fixes in here as well.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'mm/vmscan.c')
-rw-r--r-- | mm/vmscan.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/mm/vmscan.c b/mm/vmscan.c index 99e1796eb8336..9727dd8e2581b 100644 --- a/mm/vmscan.c +++ b/mm/vmscan.c @@ -2615,6 +2615,14 @@ static void shrink_node_memcgs(pg_data_t *pgdat, struct scan_control *sc) unsigned long reclaimed; unsigned long scanned; + /* + * This loop can become CPU-bound when target memcgs + * aren't eligible for reclaim - either because they + * don't have any reclaimable pages, or because their + * memory is explicitly protected. Avoid soft lockups. + */ + cond_resched(); + mem_cgroup_calculate_protection(target_memcg, memcg); if (mem_cgroup_below_min(memcg)) { |