diff options
author | Minchan Kim <[email protected]> | 2014-10-09 15:29:55 -0700 |
---|---|---|
committer | Linus Torvalds <[email protected]> | 2014-10-09 22:26:02 -0400 |
commit | 461a8eee6af3b55745be64bea403ed0b743563cf (patch) | |
tree | a1bea4ab73525d7f3f56c437b86843b04cb0e03c /net/lapb/lapb_subr.c | |
parent | 9ada9da9573f3460b156b7755c093e30b258eacb (diff) |
zram: report maximum used memory
Normally, zram user could get maximum memory usage zram consumed via
polling mem_used_total with sysfs in userspace.
But it has a critical problem because user can miss peak memory usage
during update inverval of polling. For avoiding that, user should poll it
with shorter interval(ie, 0.0000000001s) with mlocking to avoid page fault
delay when memory pressure is heavy. It would be troublesome.
This patch adds new knob "mem_used_max" so user could see the maximum
memory usage easily via reading the knob and reset it via "echo 0 >
/sys/block/zram0/mem_used_max".
Signed-off-by: Minchan Kim <[email protected]>
Reviewed-by: Dan Streetman <[email protected]>
Cc: Sergey Senozhatsky <[email protected]>
Cc: Jerome Marchand <[email protected]>
Cc: <[email protected]>
Cc: <[email protected]>
Cc: Luigi Semenzato <[email protected]>
Cc: Nitin Gupta <[email protected]>
Cc: Seth Jennings <[email protected]>
Reviewed-by: David Horner <[email protected]>
Cc: Joonsoo Kim <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
Diffstat (limited to 'net/lapb/lapb_subr.c')
0 files changed, 0 insertions, 0 deletions