1. 27 Nov, 2014 2 commits
  2. 07 Aug, 2014 2 commits
  3. 04 Jun, 2014 1 commit
  4. 13 Mar, 2014 1 commit
  5. 24 Nov, 2013 1 commit
  6. 20 Nov, 2013 7 commits
    • Phillip Lougher's avatar
      Squashfs: Check stream is not NULL in decompressor_multi.c · ed4f381e
      Phillip Lougher authored
      Fix static checker complaint that stream is not checked in
      Reported-by: default avatarDan Carpenter <[email protected]>
      Signed-off-by: default avatarPhillip Lougher <[email protected]>
      Reviewed-by: default avatarMinchan Kim <[email protected]>
    • Phillip Lougher's avatar
      Squashfs: Directly decompress into the page cache for file data · 0d455c12
      Phillip Lougher authored
      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
      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
      629145600 bytes (629 MB) copied, 45.8046 s, 13.7 MB/s
      629145600 bytes (629 MB) copied, 9.29414 s, 67.7 MB/s
      Signed-off-by: default avatarPhillip Lougher <[email protected]>
      Reviewed-by: default avatarMinchan Kim <[email protected]>
    • Phillip Lougher's avatar
      Squashfs: Restructure squashfs_readpage() · 5f55dbc0
      Phillip Lougher authored
      Restructure squashfs_readpage() splitting it into separate
      functions for datablocks, fragments and sparse blocks.
      Move the memcpying (from squashfs cache entry) implementation of
      squashfs_readpage_block into file_cache.c
      This allows different implementations to be supported.
      Signed-off-by: default avatarPhillip Lougher <[email protected]>
      Reviewed-by: default avatarMinchan Kim <[email protected]>
    • Phillip Lougher's avatar
      Squashfs: Generalise paging handling in the decompressors · 846b730e
      Phillip Lougher authored
      Further generalise the decompressors by adding a page handler
      abstraction.  This adds helpers to allow the decompressors
      to access and process the output buffers in an implementation
      independant manner.
      This allows different types of output buffer to be passed
      to the decompressors, with the implementation specific
      aspects handled at decompression time, but without the
      knowledge being held in the decompressor wrapper code.
      This will allow the decompressors to handle Squashfs
      cache buffers, and page cache pages.
      This patch adds the abstraction and an implementation for
      the caches.
      Signed-off-by: default avatarPhillip Lougher <[email protected]>
      Reviewed-by: default avatarMinchan Kim <[email protected]>
    • Phillip Lougher's avatar
      Squashfs: add multi-threaded decompression using percpu variable · d208383d
      Phillip Lougher authored
      Add a multi-threaded decompression implementation which uses
      percpu variables.
      Using percpu variables has advantages and disadvantages over
      implementations which do not use percpu variables.
        * the nature of percpu variables ensures decompression is
          load-balanced across the multiple cores.
        * simplicity.
      Disadvantages: it limits decompression to one thread per core.
      Signed-off-by: default avatarPhillip Lougher <[email protected]>
    • Minchan Kim's avatar
      squashfs: Enhance parallel I/O · cd59c2ec
      Minchan Kim authored
      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: default avatarMinchan Kim <[email protected]>
      Signed-off-by: default avatarPhillip Lougher <[email protected]>
    • Phillip Lougher's avatar
      Squashfs: Refactor decompressor interface and code · 9508c6b9
      Phillip Lougher authored
      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
      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
      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
      Signed-off-by: default avatarPhillip Lougher <[email protected]>
      Reviewed-by: default avatarMinchan Kim <[email protected]>
  7. 06 Sep, 2013 5 commits
  8. 04 Sep, 2013 1 commit
  9. 29 Aug, 2013 1 commit
  10. 29 Jun, 2013 1 commit
  11. 11 Mar, 2013 1 commit
  12. 23 Feb, 2013 1 commit
  13. 03 Oct, 2012 1 commit
  14. 21 Sep, 2012 1 commit
  15. 14 Jul, 2012 1 commit
    • Al Viro's avatar
      stop passing nameidata to ->lookup() · 00cd8dd3
      Al Viro authored
      Just the flags; only NFS cares even about that, but there are
      legitimate uses for such argument.  And getting rid of that
      completely would require splitting ->lookup() into a couple
      of methods (at least), so let's leave that alone for now...
      Signed-off-by: default avatarAl Viro <[email protected]>
  16. 21 Mar, 2012 1 commit
  17. 20 Mar, 2012 1 commit
  18. 10 Mar, 2012 7 commits
  19. 04 Jan, 2012 1 commit
    • Al Viro's avatar
      vfs: fix the stupidity with i_dentry in inode destructors · 6b520e05
      Al Viro authored
      Seeing that just about every destructor got that INIT_LIST_HEAD() copied into
      it, there is no point whatsoever keeping this INIT_LIST_HEAD in inode_init_once();
      the cost of taking it into inode_init_always() will be negligible for pipes
      and sockets and negative for everything else.  Not to mention the removal of
      boilerplate code from ->destroy_inode() instances...
      Signed-off-by: default avatarAl Viro <[email protected]>
  20. 03 Jan, 2012 1 commit
    • Phillip Lougher's avatar
      Squashfs: fix i_blocks calculation with extended regular files · 3d4a1c80
      Phillip Lougher authored
      The le64_to_cpu() forces the calculation to be unsigned, with
      the effect that it can underflow leading to an incorrect large
      This bug only triggers in rare(ish) circumstances, an empty file
      encoded as an extended regular file or a completely sparse file.
      Normally empty files are encoded as a regular file rather than as
      an extended regular file (and the regular file i_blocks calculation
      doesn't have this bug).  To save space regular file inodes are
      optimised to encode the most commonly occurring files.  Less
      common regular files are encoded using extended regular file inodes
      which contain extra information.
      Empty files with nlinks greater than 1, and or empty files
      with extended attributes are encoded using extended regular file
      inodes and they will hit this bug.
      Signed-off-by: default avatarPhillip Lougher <[email protected]>
  21. 02 Jan, 2012 1 commit
  22. 30 Dec, 2011 1 commit