From: "J. R. Okajima" <hooanon05@yahoo.co.jp>
To: phillip@lougher.demon.co.uk
Cc: linux-fsdevel@vger.kernel.org, "J. R. Okajima" <hooanon05@yahoo.co.jp>
Subject: [RFC 1/2] squashfs parallel decompression, early wait_on_buffer
Date: Sun, 11 Jul 2010 18:38:41 +0900 [thread overview]
Message-ID: <1278841122-8913-2-git-send-email-hooanon05@yahoo.co.jp> (raw)
In-Reply-To: <6909.1278827714@jrobl>
Preparing parallel decompression.
In squashfs_read_data(), move wait_on_buffer() forer which is common
part of the 'if (compressed) - else' blocks.
Signed-off-by: J. R. Okajima <hooanon05@yahoo.co.jp>
---
fs/squashfs/block.c | 17 +++++++----------
1 files changed, 7 insertions(+), 10 deletions(-)
diff --git a/fs/squashfs/block.c b/fs/squashfs/block.c
index 2a79603..1017b94 100644
--- a/fs/squashfs/block.c
+++ b/fs/squashfs/block.c
@@ -151,6 +151,12 @@ int squashfs_read_data(struct super_block *sb, void **buffer, u64 index,
}
ll_rw_block(READ, b - 1, bh + 1);
}
+ for (k = 0; k < b; k++) {
+ wait_on_buffer(bh[k]);
+ /* possible? */
+ WARN_ON(!buffer_uptodate(bh[k]));
+ }
+ k = 0;
if (compressed) {
int zlib_err = 0, zlib_init = 0;
@@ -169,9 +175,6 @@ int squashfs_read_data(struct super_block *sb, void **buffer, u64 index,
if (msblk->stream.avail_in == 0 && k < b) {
avail = min(bytes, msblk->devblksize - offset);
bytes -= avail;
- wait_on_buffer(bh[k]);
- if (!buffer_uptodate(bh[k]))
- goto release_mutex;
if (avail == 0) {
offset = 0;
@@ -223,13 +226,7 @@ int squashfs_read_data(struct super_block *sb, void **buffer, u64 index,
/*
* Block is uncompressed.
*/
- int i, in, pg_offset = 0;
-
- for (i = 0; i < b; i++) {
- wait_on_buffer(bh[i]);
- if (!buffer_uptodate(bh[i]))
- goto block_release;
- }
+ int in, pg_offset = 0;
for (bytes = length; k < b; k++) {
in = min(bytes, msblk->devblksize - offset);
--
1.6.6.1
next prev parent reply other threads:[~2010-07-11 9:39 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-06-24 2:37 Q. cache in squashfs? J. R. Okajima
2010-07-08 3:57 ` Phillip Lougher
2010-07-08 6:08 ` J. R. Okajima
2010-07-09 7:53 ` J. R. Okajima
2010-07-09 10:32 ` Phillip Lougher
2010-07-09 10:55 ` Phillip Lougher
2010-07-10 5:07 ` J. R. Okajima
2010-07-10 5:08 ` J. R. Okajima
2010-07-11 2:48 ` Phillip Lougher
2010-07-11 5:55 ` J. R. Okajima
2010-07-11 9:38 ` [RFC 0/2] squashfs parallel decompression J. R. Okajima
2011-02-22 19:41 ` Phillip Susi
2011-02-23 3:23 ` Phillip Lougher
2010-07-11 9:38 ` J. R. Okajima [this message]
2010-07-11 9:38 ` [RFC 2/2] squashfs parallel decompression, z_stream per cpu J. R. Okajima
2010-07-09 12:24 ` Q. cache in squashfs? J. R. Okajima
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=1278841122-8913-2-git-send-email-hooanon05@yahoo.co.jp \
--to=hooanon05@yahoo.co.jp \
--cc=linux-fsdevel@vger.kernel.org \
--cc=phillip@lougher.demon.co.uk \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.