From: Phillip Lougher <phillip@squashfs.org.uk>
To: linux-kernel@vger.kernel.org
Cc: minchan@kernel.org, Phillip Lougher <phillip@squashfs.org.uk>
Subject: [PATCH 0/3] Squashfs: Directly decompress into the page cache for file data
Date: Fri, 11 Oct 2013 07:19:37 +0100 [thread overview]
Message-ID: <1381472381-3825-1-git-send-email-phillip@squashfs.org.uk> (raw)
This patch-set introduces an implementation of
squashfs_readpage() that directly decompresses into the
page cache.
It first generalises 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.
It then adds a read_page() implementation for file data that
uses the 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-threaded 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
next reply other threads:[~2013-10-11 6:28 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-10-11 6:19 Phillip Lougher [this message]
2013-10-11 6:19 ` [PATCH 1/3] Squashfs: Generalise paging handling in the decompressors Phillip Lougher
2013-10-11 6:19 ` [PATCH 2/3] Squashfs: restructure squashfs_readpage() Phillip Lougher
2013-10-11 6:19 ` [PATCH 3/3] Squashfs: Directly decompress into the page cache for file data Phillip Lougher
2013-10-14 1:43 ` Minchan Kim
2013-10-11 8:03 ` [PATCH 0/3] " Minchan Kim
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1381472381-3825-1-git-send-email-phillip@squashfs.org.uk \
--to=phillip@squashfs.org.uk \
--cc=linux-kernel@vger.kernel.org \
--cc=minchan@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®