Commit graph

13 commits

Author SHA1 Message Date
Minchan Kim cd59c2ec5f squashfs: Enhance parallel I/O
Now squashfs have used for only one stream buffer for decompression
so it hurts parallel read performance so this patch supports
multiple decompressor to enhance performance parallel I/O.

Four 1G file dd read on KVM machine which has 2 CPU and 4G memory.

dd if=test/test1.dat of=/dev/null &
dd if=test/test2.dat of=/dev/null &
dd if=test/test3.dat of=/dev/null &
dd if=test/test4.dat of=/dev/null &

old : 1m39s -> new : 9s

* From v1
  * Change comp_strm with decomp_strm - Phillip
  * Change/add comments - Phillip

Signed-off-by: Minchan Kim <minchan@kernel.org>
Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
2013-11-20 03:35:18 +00:00
Phillip Lougher 9508c6b90b Squashfs: Refactor decompressor interface and code
The decompressor interface and code was written from
the point of view of single-threaded operation.  In doing
so it mixed a lot of single-threaded implementation specific
aspects into the decompressor code and elsewhere which makes it
difficult to seamlessly support multiple different decompressor
implementations.

This patch does the following:

1.  It removes compressor_options parsing from the decompressor
    init() function.  This allows the decompressor init() function
    to be dynamically called to instantiate multiple decompressors,
    without the compressor options needing to be read and parsed each
    time.

2.  It moves threading and all sleeping operations out of the
    decompressors.  In doing so, it makes the decompressors
    non-blocking wrappers which only deal with interfacing with
    the decompressor implementation.

3. It splits decompressor.[ch] into decompressor generic functions
   in decompressor.[ch], and moves the single threaded
   decompressor implementation into decompressor_single.c.

The result of this patch is Squashfs should now be able to
support multiple decompressors by adding new decompressor_xxx.c
files with specialised implementations of the functions in
decompressor_single.c

Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
Reviewed-by: Minchan Kim <minchan@kernel.org>
2013-11-20 03:35:18 +00:00
Phillip Lougher cc6d349714 Squashfs: Make ZLIB compression support optional
Squashfs now supports XZ and LZO compression in addition to ZLIB.
As such it no longer makes sense to always include ZLIB support.
In particular embedded systems may only use LZO or XZ compression, and
the ability to exclude ZLIB support will reduce kernel size.

Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
2011-07-22 03:01:28 +01:00
Phillip Lougher 7a43ae5237 Squashfs: Add XZ compression configuration option
Signed-off-by: Phillip Lougher <phillip@lougher.demon.co.uk>
2011-01-13 21:16:52 +00:00
Chan Jeong 79cb8ced7e Squashfs: Add LZO compression support
Signed-off-by: Chan Jeong <chan.jeong@lge.com>
Signed-off-by: Phillip Lougher <phillip@lougher.demon.co.uk>
2010-08-05 02:29:59 +01:00
Phillip Lougher 637d5c9a36 Squashfs: Make XATTR config name consistent with other file systems
Reported-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Phillip Lougher <phillip@lougher.demon.co.uk>
2010-05-31 18:46:29 +01:00
Phillip Lougher 01e5b4e4e8 squashfs: add xattr support configure option
Signed-off-by: Phillip Lougher <phillip@lougher.demon.co.uk>
2010-05-17 19:54:07 +01:00
Phillip Lougher f41d207cbe squashfs: add support for xattr reading
Add support for listxattr and getxattr.  Also add xattr definitions.

Signed-off-by: Phillip Lougher <phillip@lougher.demon.co.uk>
2010-05-17 19:54:06 +01:00
Phillip Lougher 4b5397dc24 squashfs: add xattr id support
This patch adds support for mapping xattr ids (stored in inodes)
into the on-disk location of the xattrs themselves.

Signed-off-by: Phillip Lougher <phillip@lougher.demon.co.uk>
2010-05-17 19:54:05 +01:00
Phillip Lougher 4c0f0bb235 Squashfs: add a decompressor framework
This adds a decompressor framework which allows multiple compression
algorithms to be cleanly supported.

Also update zlib wrapper and other code to use the new framework.

Signed-off-by: Phillip Lougher <phillip@lougher.demon.co.uk>
2010-01-20 21:47:47 +00:00
Phillip Lougher e6a6d37955 Squashfs: move zlib decompression wrapper code into a separate file
Signed-off-by: Phillip Lougher <phillip@lougher.demon.co.uk>
2010-01-20 21:47:46 +00:00
Phillip Lougher e5d287539d Squashfs: cody tidying, remove commented out line in Makefile
Signed-off-by: Phillip Lougher <phillip@lougher.demon.co.uk>
2009-05-13 03:25:20 +01:00
Phillip Lougher fcef6fb6c5 Squashfs: Makefiles
Signed-off-by: Phillip Lougher <phillip@lougher.demon.co.uk>
2009-01-05 08:46:27 +00:00