diff options
author | Ingo Molnar <mingo@kernel.org> | 2020-03-06 11:56:40 +0100 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2020-03-06 11:56:40 +0100 |
commit | 1941011a8bd26f01f36f827d5ebc6469749485bb (patch) | |
tree | 841ae1b789ec642bad8782b2e2bf0eda8ac514db /mm/vmscan.c | |
parent | fdb64822443ec9fb8c3a74b598a74790ae8d2e22 (diff) | |
parent | b95b4d5ef061806fde07a6a3255e6c07f4fed0d3 (diff) |
Merge branch 'perf/urgent' into perf/core, to pick up the latest fixes
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'mm/vmscan.c')
-rw-r--r-- | mm/vmscan.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/mm/vmscan.c b/mm/vmscan.c index c05eb9efec07..876370565455 100644 --- a/mm/vmscan.c +++ b/mm/vmscan.c @@ -2415,10 +2415,13 @@ out: /* * Scan types proportional to swappiness and * their relative recent reclaim efficiency. - * Make sure we don't miss the last page - * because of a round-off error. + * Make sure we don't miss the last page on + * the offlined memory cgroups because of a + * round-off error. */ - scan = DIV64_U64_ROUND_UP(scan * fraction[file], + scan = mem_cgroup_online(memcg) ? + div64_u64(scan * fraction[file], denominator) : + DIV64_U64_ROUND_UP(scan * fraction[file], denominator); break; case SCAN_FILE: |