aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation/ABI/testing/sysfs-block-zram
diff options
context:
space:
mode:
authorSergey Senozhatsky <sergey.senozhatsky@gmail.com>2014-04-07 15:38:13 -0700
committerSimon Shields <keepcalm444@gmail.com>2016-06-12 21:20:01 +1000
commit0379e619c298e0b53543df4761818f42e0d5a481 (patch)
treecf828b834c8f0ff40530fc3b9490e0c43cfbd55e /Documentation/ABI/testing/sysfs-block-zram
parent18221099f0957d7c21c932c38cb2247534f377b2 (diff)
downloadkernel_samsung_smdk4412-0379e619c298e0b53543df4761818f42e0d5a481.zip
kernel_samsung_smdk4412-0379e619c298e0b53543df4761818f42e0d5a481.tar.gz
kernel_samsung_smdk4412-0379e619c298e0b53543df4761818f42e0d5a481.tar.bz2
zram: factor out single stream compression
This is preparation patch to add multi stream support to zcomp. Introduce struct zcomp_strm_single and a set of functions to manage zcomp_strm stream access. zcomp_strm_single implements single compession stream, same way as current zcomp implementation. This moves zcomp_strm stream control and locking from zcomp, so compressing backend zcomp is not aware of required locking. Single and multi streams require different locking schemes. Minchan Kim reported that spinlock-based locking scheme (which is used in multi stream implementation) has demonstrated a severe perfomance regression for single compression stream case, comparing to mutex-based. see https://lkml.org/lkml/2014/2/18/16 The following set of functions added: - zcomp_strm_single_find()/zcomp_strm_single_release() find and release a compression stream, implement required locking - zcomp_strm_single_create()/zcomp_strm_single_destroy() create and destroy zcomp_strm_single New ->strm_find() and ->strm_release() callbacks added to zcomp, which are set to zcomp_strm_single_find() and zcomp_strm_single_release() during initialisation. Instead of direct locking and zcomp_strm access from zcomp_strm_find() and zcomp_strm_release(), zcomp now calls ->strm_find() and ->strm_release() correspondingly. Signed-off-by: Sergey Senozhatsky <sergey.senozhatsky@gmail.com> Acked-by: Minchan Kim <minchan@kernel.org> Cc: Jerome Marchand <jmarchan@redhat.com> Cc: Nitin Gupta <ngupta@vflare.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'Documentation/ABI/testing/sysfs-block-zram')
0 files changed, 0 insertions, 0 deletions