• M
    zram: zram memory size limitation · 9ada9da9
    Minchan Kim 提交于
    Since zram has no control feature to limit memory usage, it makes hard to
    manage system memrory.
    
    This patch adds new knob "mem_limit" via sysfs to set up the a limit so
    that zram could fail allocation once it reaches the limit.
    
    In addition, user could change the limit in runtime so that he could
    manage the memory more dynamically.
    
    Initial state is no limit so it doesn't break old behavior.
    
    [akpm@linux-foundation.org: fix typo, per Sergey]
    Signed-off-by: NMinchan Kim <minchan@kernel.org>
    Cc: Dan Streetman <ddstreet@ieee.org>
    Cc: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
    Cc: Jerome Marchand <jmarchan@redhat.com>
    Cc: <juno.choi@lge.com>
    Cc: <seungho1.park@lge.com>
    Cc: Luigi Semenzato <semenzato@google.com>
    Cc: Nitin Gupta <ngupta@vflare.org>
    Cc: Seth Jennings <sjennings@variantweb.net>
    Cc: David Horner <ds2horner@gmail.com>
    Cc: Joonsoo Kim <iamjoonsoo.kim@lge.com>
    Cc: Minchan Kim <minchan@kernel.org>
    Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
    Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
    9ada9da9
zram_drv.h 3.2 KB