1. 20 Nov, 2013 6 commits
    • 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
      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: 's avatarPhillip Lougher <phillip@squashfs.org.uk>
      Reviewed-by: 's avatarMinchan Kim <minchan@kernel.org>
      0d455c12
    • 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: 's avatarPhillip Lougher <phillip@squashfs.org.uk>
      Reviewed-by: 's avatarMinchan Kim <minchan@kernel.org>
      5f55dbc0
    • 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: 's avatarPhillip Lougher <phillip@squashfs.org.uk>
      Reviewed-by: 's avatarMinchan Kim <minchan@kernel.org>
      846b730e
    • 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.
      
      Advantages:
        * 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: 's avatarPhillip Lougher <phillip@squashfs.org.uk>
      d208383d
    • 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: 's avatarMinchan Kim <minchan@kernel.org>
      Signed-off-by: 's avatarPhillip Lougher <phillip@squashfs.org.uk>
      cd59c2ec
    • 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
      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: 's avatarPhillip Lougher <phillip@squashfs.org.uk>
      Reviewed-by: 's avatarMinchan Kim <minchan@kernel.org>
      9508c6b9
  2. 06 Sep, 2013 5 commits
  3. 04 Sep, 2013 1 commit
  4. 29 Aug, 2013 1 commit
  5. 29 Jun, 2013 1 commit
  6. 11 Mar, 2013 1 commit
  7. 23 Feb, 2013 1 commit
  8. 03 Oct, 2012 1 commit
  9. 21 Sep, 2012 1 commit
  10. 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: 's avatarAl Viro <viro@zeniv.linux.org.uk>
      00cd8dd3
  11. 21 Mar, 2012 1 commit
  12. 20 Mar, 2012 1 commit
  13. 10 Mar, 2012 7 commits
  14. 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: 's avatarAl Viro <viro@zeniv.linux.org.uk>
      6b520e05
  15. 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
      value.
      
      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: 's avatarPhillip Lougher <phillip@squashfs.org.uk>
      3d4a1c80
  16. 02 Jan, 2012 1 commit
  17. 30 Dec, 2011 2 commits
  18. 02 Nov, 2011 2 commits
  19. 27 Sep, 2011 1 commit
    • Paul Bolle's avatar
      doc: fix broken references · 395cf969
      Paul Bolle authored
      There are numerous broken references to Documentation files (in other
      Documentation files, in comments, etc.). These broken references are
      caused by typo's in the references, and by renames or removals of the
      Documentation files. Some broken references are simply odd.
      
      Fix these broken references, sometimes by dropping the irrelevant text
      they were part of.
      Signed-off-by: 's avatarPaul Bolle <pebolle@tiscali.nl>
      Signed-off-by: 's avatarJiri Kosina <jkosina@suse.cz>
      395cf969
  20. 22 Jul, 2011 1 commit
  21. 20 Jul, 2011 2 commits
  22. 29 May, 2011 1 commit