aboutsummaryrefslogtreecommitdiff
path: root/scripts/gdb/vmlinux-gdb.py
diff options
context:
space:
mode:
authorMichal Hocko <[email protected]>2015-11-05 18:50:29 -0800
committerLinus Torvalds <[email protected]>2015-11-05 19:34:48 -0800
commitc12176d3368b9b36ae484d323d41e94be26f9b65 (patch)
tree9ab6d6d5aac7c1f68a0560b0122f7080331d98fd /scripts/gdb/vmlinux-gdb.py
parent6071ca5201066f4b2a61cfb693dd186d6bc6e9f3 (diff)
memcg: fix thresholds for 32b architectures.
Commit 424cdc141380 ("memcg: convert threshold to bytes") has fixed a regression introduced by 3e32cb2e0a12 ("mm: memcontrol: lockless page counters") where thresholds were silently converted to use page units rather than bytes when interpreting the user input. The fix is not complete, though, as properly pointed out by Ben Hutchings during stable backport review. The page count is converted to bytes but unsigned long is used to hold the value which would be obviously not sufficient for 32b systems with more than 4G thresholds. The same applies to usage as taken from mem_cgroup_usage which might overflow. Let's remove this bytes vs. pages internal tracking differences and handle thresholds in page units internally. Chage mem_cgroup_usage() to return the value in page units and revert 424cdc141380 because this should be sufficient for the consistent handling. mem_cgroup_read_u64 as the only users of mem_cgroup_usage outside of the threshold handling code is converted to give the proper in bytes result. It is doing that already for page_counter output so this is more consistent as well. The value presented to the userspace is still in bytes units. Fixes: 424cdc141380 ("memcg: convert threshold to bytes") Fixes: 3e32cb2e0a12 ("mm: memcontrol: lockless page counters") Signed-off-by: Michal Hocko <[email protected]> Reported-by: Ben Hutchings <[email protected]> Reviewed-by: Vladimir Davydov <[email protected]> Acked-by: Johannes Weiner <[email protected]> Cc: <[email protected]> From: Michal Hocko <[email protected]> Subject: memcg-fix-thresholds-for-32b-architectures-fix Cc: Ben Hutchings <[email protected]> Cc: Vladimir Davydov <[email protected]> Cc: Johannes Weiner <[email protected]> From: Andrew Morton <[email protected]> Subject: memcg-fix-thresholds-for-32b-architectures-fix-fix don't attempt to inline mem_cgroup_usage() The compiler ignores the inline anwyay. And __always_inlining it adds 600 bytes of goop to the .o file. Cc: Ben Hutchings <[email protected]> Cc: Johannes Weiner <[email protected]> Cc: Michal Hocko <[email protected]> Cc: Vladimir Davydov <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
Diffstat (limited to 'scripts/gdb/vmlinux-gdb.py')
0 files changed, 0 insertions, 0 deletions