From 8cde0daf6c4cca8babec4861a1ce7f8875edf879 Mon Sep 17 00:00:00 2001 From: Riku Voipio Date: Tue, 26 Jul 2016 15:21:20 -0700 Subject: scripts/bloat-o-meter: fix percent on <1% changes Python divisions are integer divisions unless at least one parameter is a float. The current bloat-o-meter fails to print sub-percentage changes: Total: Before=10515408, After=10604060, chg 0.000000% Force float division by using one float and pretty the print to two significant decimals: Total: Before=10515408, After=10604060, chg +0.84% Link: http://lkml.kernel.org/r/1465980311-23814-1-git-send-email-riku.voipio@linaro.org Signed-off-by: Riku Voipio Reviewed-by: Josh Triplett Cc: Vineet Gupta Cc: Michal Marek Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- scripts/bloat-o-meter | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'scripts') diff --git a/scripts/bloat-o-meter b/scripts/bloat-o-meter index 0254f3ba0dba..19f5adfd877d 100755 --- a/scripts/bloat-o-meter +++ b/scripts/bloat-o-meter @@ -67,5 +67,5 @@ print("%-40s %7s %7s %+7s" % ("function", "old", "new", "delta")) for d, n in delta: if d: print("%-40s %7s %7s %+7d" % (n, old.get(n,"-"), new.get(n,"-"), d)) -print("Total: Before=%d, After=%d, chg %f%%" % \ - (otot, ntot, (ntot - otot)*100/otot)) +print("Total: Before=%d, After=%d, chg %+.2f%%" % \ + (otot, ntot, (ntot - otot)*100.0/otot)) -- cgit v1.2.1 From 632c0a1affd861f81abdd136c886418571e19a51 Mon Sep 17 00:00:00 2001 From: Vladimir Davydov Date: Tue, 26 Jul 2016 15:24:18 -0700 Subject: mm: clean up non-standard page->_mapcount users - Add a proper comment to page->_mapcount. - Introduce a macro for generating helper functions. - Place all special page->_mapcount values next to each other so that readers can see all possible values and so we don't get duplicates. Link: http://lkml.kernel.org/r/502f49000e0b63e6c62e338fac6b420bf34fb526.1464079537.git.vdavydov@virtuozzo.com Signed-off-by: Vladimir Davydov Cc: Johannes Weiner Cc: Michal Hocko Cc: Eric Dumazet Cc: Minchan Kim Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- scripts/tags.sh | 3 +++ 1 file changed, 3 insertions(+) (limited to 'scripts') diff --git a/scripts/tags.sh b/scripts/tags.sh index f72f48f638ae..ed7eef24ef89 100755 --- a/scripts/tags.sh +++ b/scripts/tags.sh @@ -185,6 +185,9 @@ regex_c=( '/\