mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Namjae Jeon <linkinjeon@gmail.com>
To: phillip@squashfs.org.uk
Cc: linux-kernel@vger.kernel.org, Namjae Jeon <linkinjeon@gmail.com>
Subject: [PATCH] squashfs : devblksize set to 4KB intead of BLOCK_SIZE(1KB).
Date: Mon, 19 Sep 2011 00:24:52 +0900	[thread overview]
Message-ID: <1316359492-2297-1-git-send-email-linkinjeon@gmail.com> (raw)

If devblksize is set by NAND page size before, I think that it is changed to optimal vaule with increasing physical page size of NAND.
So I suggest that devblksize is set to 4KB. it is suitable for physical page size of NAND(onenand, flexonenand etc..) and the minimal compressed size.
and user gain improved performance(~%20) and stop reading inefficiently several time by page alignment.

Signed-off-by: Namjae Jeon <linkinjeon@gmail.com>
---
 fs/squashfs/squashfs_fs.h |    3 +++
 fs/squashfs/super.c       |    2 +-
 2 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/fs/squashfs/squashfs_fs.h b/fs/squashfs/squashfs_fs.h
index b4a4e53..c667921 100644
--- a/fs/squashfs/squashfs_fs.h
+++ b/fs/squashfs/squashfs_fs.h
@@ -32,6 +32,9 @@
 #define SQUASHFS_METADATA_SIZE		8192
 #define SQUASHFS_METADATA_LOG		13
 
+/* size of device blocks */
+#define SQUASHFS_DEVBLK_SIZE		4096
+
 /* default size of data blocks */
 #define SQUASHFS_FILE_SIZE		131072
 #define SQUASHFS_FILE_LOG		17
diff --git a/fs/squashfs/super.c b/fs/squashfs/super.c
index 7438850..2da1715 100644
--- a/fs/squashfs/super.c
+++ b/fs/squashfs/super.c
@@ -95,7 +95,7 @@ static int squashfs_fill_super(struct super_block *sb, void *data, int silent)
 	}
 	msblk = sb->s_fs_info;
 
-	msblk->devblksize = sb_min_blocksize(sb, BLOCK_SIZE);
+	msblk->devblksize = sb_min_blocksize(sb, SQUASHFS_DEVBLK_SIZE);
 	msblk->devblksize_log2 = ffz(~msblk->devblksize);
 
 	mutex_init(&msblk->read_data_mutex);
-- 
1.7.4.4


                 reply	other threads:[~2011-09-18 15:25 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=1316359492-2297-1-git-send-email-linkinjeon@gmail.com \
    --to=linkinjeon@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=phillip@squashfs.org.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 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®