summaryrefslogtreecommitdiffstats
path: root/mm/oom_kill.c
diff options
context:
space:
mode:
authorSergey Senozhatsky2016-03-17 22:20:42 +0100
committerLinus Torvalds2016-03-17 23:09:34 +0100
commit1120ed5483941d9cd2cf52cb9644a4311dbd1011 (patch)
tree812bcefa08125a5ea02a02cc3d4c1129f737128c /mm/oom_kill.c
parentzsmalloc: drop unused member 'mapping_area->huge' (diff)
downloadkernel-qcow2-linux-1120ed5483941d9cd2cf52cb9644a4311dbd1011.tar.gz
kernel-qcow2-linux-1120ed5483941d9cd2cf52cb9644a4311dbd1011.tar.xz
kernel-qcow2-linux-1120ed5483941d9cd2cf52cb9644a4311dbd1011.zip
mm/zsmalloc: add `freeable' column to pool stat
Add a new column to pool stats, which will tell how many pages ideally can be freed by class compaction, so it will be easier to analyze zsmalloc fragmentation. At the moment, we have only numbers of FULL and ALMOST_EMPTY classes, but they don't tell us how badly the class is fragmented internally. The new /sys/kernel/debug/zsmalloc/zramX/classes output look as follows: class size almost_full almost_empty obj_allocated obj_used pages_used pages_per_zspage freeable [..] 12 224 0 2 146 5 8 4 4 13 240 0 0 0 0 0 1 0 14 256 1 13 1840 1672 115 1 10 15 272 0 0 0 0 0 1 0 [..] 49 816 0 3 745 735 149 1 2 51 848 3 4 361 306 76 4 8 52 864 12 14 378 268 81 3 21 54 896 1 12 117 57 26 2 12 57 944 0 0 0 0 0 3 0 [..] Total 26 131 12709 10994 1071 134 For example, from this particular output we can easily conclude that class-896 is heavily fragmented -- it occupies 26 pages, 12 can be freed by compaction. Signed-off-by: Sergey Senozhatsky <sergey.senozhatsky@gmail.com> Acked-by: Minchan Kim <minchan@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'mm/oom_kill.c')
0 files changed, 0 insertions, 0 deletions