linux_old1/fs/squashfs
Phillip Lougher 0d455c12c6 Squashfs: Directly decompress into the page cache for file data
This introduces an implementation of squashfs_readpage_block()
that directly decompresses into the page cache.

This uses the previously added page handler abstraction to push
down the necessary kmap_atomic/kunmap_atomic operations on the
page cache buffers into the decompressors.  This enables
direct copying into the page cache without using the slow
kmap/kunmap calls.

The code detects when multiple threads are racing in
squashfs_readpage() to decompress the same block, and avoids
this regression by falling back to using an intermediate
buffer.

This patch enhances the performance of Squashfs significantly
when multiple processes are accessing the filesystem simultaneously
because it not only reduces memcopying, but it more importantly
eliminates the lock contention on the intermediate buffer.

Using single-thread decompression.

        dd if=file1 of=/dev/null bs=4096 &
        dd if=file2 of=/dev/null bs=4096 &
        dd if=file3 of=/dev/null bs=4096 &
        dd if=file4 of=/dev/null bs=4096

Before:

629145600 bytes (629 MB) copied, 45.8046 s, 13.7 MB/s

After:

629145600 bytes (629 MB) copied, 9.29414 s, 67.7 MB/s

Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
Reviewed-by: Minchan Kim <minchan@kernel.org>
2013-11-20 03:59:13 +00:00
..
Kconfig Squashfs: Directly decompress into the page cache for file data 2013-11-20 03:59:13 +00:00
Makefile Squashfs: Directly decompress into the page cache for file data 2013-11-20 03:59:13 +00:00
block.c Squashfs: Generalise paging handling in the decompressors 2013-11-20 03:59:01 +00:00
cache.c Squashfs: Generalise paging handling in the decompressors 2013-11-20 03:59:01 +00:00
decompressor.c Squashfs: Generalise paging handling in the decompressors 2013-11-20 03:59:01 +00:00
decompressor.h Squashfs: Generalise paging handling in the decompressors 2013-11-20 03:59:01 +00:00
decompressor_multi.c Squashfs: Generalise paging handling in the decompressors 2013-11-20 03:59:01 +00:00
decompressor_multi_percpu.c Squashfs: Generalise paging handling in the decompressors 2013-11-20 03:59:01 +00:00
decompressor_single.c Squashfs: Generalise paging handling in the decompressors 2013-11-20 03:59:01 +00:00
dir.c Squashfs: add corruption check for type in squashfs_readdir() 2013-09-06 04:57:54 +01:00
export.c Squashfs: Fix sanity check patches on big-endian systems 2011-05-29 10:03:09 +01:00
file.c Squashfs: Restructure squashfs_readpage() 2013-11-20 03:59:07 +00:00
file_cache.c Squashfs: Restructure squashfs_readpage() 2013-11-20 03:59:07 +00:00
file_direct.c Squashfs: Directly decompress into the page cache for file data 2013-11-20 03:59:13 +00:00
fragment.c Squashfs: Fix sanity check patches on big-endian systems 2011-05-29 10:03:09 +01:00
id.c Squashfs: Fix sanity check patches on big-endian systems 2011-05-29 10:03:09 +01:00
inode.c userns: Convert squashfs to use kuid/kgid where appropriate 2012-09-21 03:13:35 -07:00
lzo_wrapper.c Squashfs: Generalise paging handling in the decompressors 2013-11-20 03:59:01 +00:00
namei.c Squashfs: fix corruption checks in squashfs_lookup() 2013-09-06 04:57:53 +01:00
page_actor.c Squashfs: Directly decompress into the page cache for file data 2013-11-20 03:59:13 +00:00
page_actor.h Squashfs: Directly decompress into the page cache for file data 2013-11-20 03:59:13 +00:00
squashfs.h Squashfs: Restructure squashfs_readpage() 2013-11-20 03:59:07 +00:00
squashfs_fs.h Squashfs: add corruption check for type in squashfs_readdir() 2013-09-06 04:57:54 +01:00
squashfs_fs_i.h Squashfs: update email address 2011-05-26 10:49:11 +01:00
squashfs_fs_sb.h Squashfs: Generalise paging handling in the decompressors 2013-11-20 03:59:01 +00:00
super.c Squashfs: Refactor decompressor interface and code 2013-11-20 03:35:18 +00:00
symlink.c squashfs: remove the second argument of k[un]map_atomic() 2012-03-20 21:48:25 +08:00
xattr.c Squashfs: update email address 2011-05-26 10:49:11 +01:00
xattr.h Squashfs: update email address 2011-05-26 10:49:11 +01:00
xattr_id.c Squashfs: update email address 2011-05-26 10:49:11 +01:00
xz_wrapper.c Squashfs: Generalise paging handling in the decompressors 2013-11-20 03:59:01 +00:00
zlib_wrapper.c Squashfs: Generalise paging handling in the decompressors 2013-11-20 03:59:01 +00:00