linux-mtd.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Shmulik Ladkani <shmulik.ladkani@gmail.com>
To: Ricard Wanderlof <ricard.wanderlof@axis.com>
Cc: Grant Edwards <grant.b.edwards@gmail.com>,
	"linux-mtd@lists.infradead.org" <linux-mtd@lists.infradead.org>,
	Artem Bityutskiy <dedekind1@gmail.com>
Subject: Re: Question about mkfs.jffs2 "-s" option
Date: Thu, 3 May 2012 21:13:34 +0300	[thread overview]
Message-ID: <20120503211334.17c91b31@halley> (raw)
In-Reply-To: <Pine.LNX.4.64.1205030930540.8107@lnxricardw.se.axis.com>

Hi Ricard,
	
On Thu, 3 May 2012 09:35:14 +0200 (CEST) Ricard Wanderlof <ricard.wanderlof@axis.com> wrote:
> 
> On Wed, 2 May 2012, Grant Edwards wrote:
> 
> > The NAND flash I'm using has to be written in 4K blocks -- isn't that
> > the "page size"?
> 
> The smallest writable unit in a NAND flash is called a 'page', but AFAIK 
> this is not what the -s option in mkfs.jffs2 is for. Instead, it is 
> related for the kernel memory managament page size, which is 4k for most 
> architectures.

According to MKFS.JFFS2(1),

	-s, --pagesize=SIZE
		Use page size SIZE.  The default is 4 KiB.  This size is
		the maximum size of a data node.

And according to http://linux-mtd.infradead.org/~dwmw2/jffs2.pdf

	In order to facilitate rapid decompression of
	data upon readpage() requests, nodes contain
	no more than a single page of data, according to
	the hardware page size on the target platform.

Wow.
I always assumed I had to set it according to NAND's page size, not
according to target system's mm page size.

Can you tell what's the effect of incorrectly setting it to values such
as: 512 or 2048 bytes (instead of 4KiB)?

Well, I guess as data is written during runtime by the jffs2 itself, and
as the GC gets working, new inodes will be correctly created, and their
sizes will be up to system's page size.

However what happens with these small inodes initially created by
mkfs.jffs2? "Only" a performance penalty or something worse?

Thanks,
Shmulik

  parent reply	other threads:[~2012-05-03 18:13 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-02 16:08 Question about mkfs.jffs2 "-s" option Grant Edwards
2012-05-03  6:51 ` Shmulik Ladkani
2012-05-03 14:11   ` Grant Edwards
2012-05-03  7:35 ` Ricard Wanderlof
2012-05-03 14:12   ` Grant Edwards
2012-05-03 18:13   ` Shmulik Ladkani [this message]
2012-05-03 18:21     ` Grant Edwards
2012-05-04  7:15     ` Artem Bityutskiy
2012-05-04 12:00       ` Shmulik Ladkani

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=20120503211334.17c91b31@halley \
    --to=shmulik.ladkani@gmail.com \
    --cc=dedekind1@gmail.com \
    --cc=grant.b.edwards@gmail.com \
    --cc=linux-mtd@lists.infradead.org \
    --cc=ricard.wanderlof@axis.com \
    /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;
as well as URLs for NNTP newsgroup(s).