* Understanding page size in jffs2- and kernel-source
@ 2011-10-17 8:52 Freise, Bjoern-Achim
2011-10-18 8:32 ` Ricard Wanderlof
2011-10-19 14:37 ` Artem Bityutskiy
0 siblings, 2 replies; 3+ messages in thread
From: Freise, Bjoern-Achim @ 2011-10-17 8:52 UTC (permalink / raw)
To: linux-mtd
Hello,
we are using Kernel 2.6.28 with mtd-utils 1.0.1 on an ARM at91sam9260 with a NAND flash with 512 byte pages an 16k erase size. And now I'm trying to understand a few things:
1) In the kernel source it has PAGE_SIZE and PAGE_CACHE_SIZE with 4096. These defines are used in the jffs2 implementation. Is that correct when using 512 byte pages in a NAND device?
2) In our build-environment our image is created with "mkfs.jffs2 .... --page-size=512.... ". I guess this doesn't match with the above?
3) What should I use for a good performance (page_size and/or with/out compression) when using a large (~ 16MB) sqlite-file?
I'm really unsure with these things.
Regards,
Björn Freise
Energiesparen mit adapterm. Mehr Infos unter http://www.techem.de/adapterm
__________________________________________
Techem Energy Services GmbH
Sitz der Gesellschaft: Eschborn
Amtsgericht Frankfurt am Main: HRB 74732
Geschaeftsfuehrung: Hans-Lothar Schaefer (Vors.), Steffen Baetjer, Dr. Rolf Weber
Aufsichtsrat: Hilko Schomerus (Vors.)
This e-mail and any attachment thereto contains confidental and/or privileged information. If you are not the intended recipient or have received this e-mail in error, please notify the sender immediately and delete this e-mail and any attachment thereto from your system. Any unauthorized retention, copying, transmission, distribution, disclosure or use of the content of this e-mail and/or any attachment thereto is prohibited. Techem is not liable for any omission or error in this e-mail and/or any attachment thereto which may arise as a result of the e-mail-transmission or for damages resulting from any unauthorized change of the content of this e-mail and/or any attachment thereto.
Thank You
Techem Energy Services GmbH
Der Inhalt dieser E-Mail und ihrer Anhaenge ist vertraulich und kann rechtlich geschuetzte Informationen enthalten. Falls Sie nicht der richtige Adressat sind oder diese E-Mail irrtuemlich erhalten haben, informieren Sie bitte umgehend den Absender und vernichten Sie diese E-Mail und ihre Anhaenge. Jegliche Offenlegung, Vervielfaeltigung, Weitergabe oder Nutzung des Inhalts dieser Email oder ihrer Anhaenge ist untersagt. Techem haftet nicht fuer Unvollstaendigkeiten und Fehler in dieser E-Mail und /oder ihren Anhaengen, die als Folge der Uebersendung auftreten, oder fuer Schaeden, die infolge unerlaubter Aenderungen des Inhalts dieser E-Mail und/oder ihrer Anhaenge entstehen.
Vielen Dank
Techem Energy Services GmbH
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Understanding page size in jffs2- and kernel-source
2011-10-17 8:52 Understanding page size in jffs2- and kernel-source Freise, Bjoern-Achim
@ 2011-10-18 8:32 ` Ricard Wanderlof
2011-10-19 14:37 ` Artem Bityutskiy
1 sibling, 0 replies; 3+ messages in thread
From: Ricard Wanderlof @ 2011-10-18 8:32 UTC (permalink / raw)
To: Freise, Bjoern-Achim; +Cc: linux-mtd@lists.infradead.org
On Mon, 17 Oct 2011, Freise, Bjoern-Achim wrote:
> Hello,
>
> we are using Kernel 2.6.28 with mtd-utils 1.0.1 on an ARM at91sam9260
> with a NAND flash with 512 byte pages an 16k erase size. And now I'm
> trying to understand a few things:
>
> 1) In the kernel source it has PAGE_SIZE and PAGE_CACHE_SIZE with 4096.
> These defines are used in the jffs2 implementation. Is that correct when
> using 512 byte pages in a NAND device?
The PAGE_SIZE used in the kernel (4096 in this case) has no relation to
the page size of the NAND flash device. The kernel PAGE_SIZE is related
to the memory managment and is usually fixed for a given CPU architecture.
The NAND flash page size is the smallest programmable unit in the flash.
> 2) In our build-environment our image is created with "mkfs.jffs2 ....
> --page-size=512.... ". I guess this doesn't match with the above?
The page size you specify to mkfs.jffs2 is the size of the flash device.
(Just a note: There are however file systems such as cramfs where the page
size specified in the kernel is also used when creating the file system.)
> 3) What should I use for a good performance (page_size and/or with/out
> compression) when using a large (~ 16MB) sqlite-file?
By performance I assume you mean transfer rate?
I'm not sure about this, but I would expect that it depends on how fast
your system's nand flash interface is. With compression on, the system has
to spend time compressing/decompressing, on the other hand, there is less
data to be transfered to/from the flash. With compression off, there's
more data, but no time has to be spent compressing/decompressing. If you
have a fast CPU but slow nand flash interface I would expect compression
would be beneficial.
Easiest would be just to try this out.
/Ricard
--
Ricard Wolf Wanderlöf ricardw(at)axis.com
Axis Communications AB, Lund, Sweden www.axis.com
Phone +46 46 272 2016 Fax +46 46 13 61 30
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Understanding page size in jffs2- and kernel-source
2011-10-17 8:52 Understanding page size in jffs2- and kernel-source Freise, Bjoern-Achim
2011-10-18 8:32 ` Ricard Wanderlof
@ 2011-10-19 14:37 ` Artem Bityutskiy
1 sibling, 0 replies; 3+ messages in thread
From: Artem Bityutskiy @ 2011-10-19 14:37 UTC (permalink / raw)
To: Freise, Bjoern-Achim; +Cc: linux-mtd
[-- Attachment #1: Type: text/plain, Size: 1164 bytes --]
On Mon, 2011-10-17 at 10:52 +0200, Freise, Bjoern-Achim wrote:
> Hello,
>
> we are using Kernel 2.6.28 with mtd-utils 1.0.1 on an ARM at91sam9260
> with a NAND flash with 512 byte pages an 16k erase size. And now I'm
> trying to understand a few things:
>
> 1) In the kernel source it has PAGE_SIZE and PAGE_CACHE_SIZE with
> 4096. These defines are used in the jffs2 implementation. Is that
> correct when using 512 byte pages in a NAND device?
Kernel macros are about RAM page size, which is 4KiB in most arm
systems. This is not NAND page size.
AFAIR, PAGE_SIZE is the RAM page size, but PAGE_CACHE_SIZE is the page
cache page size, which is in practice is always the same as PAGE_SIZE.
> 2) In our build-environment our image is created with "mkfs.jffs2 ....
> --page-size=512.... ". I guess this doesn't match with the above?
This is NAND page size, so looks right.
> 3) What should I use for a good performance (page_size and/or with/out
> compression) when using a large (~ 16MB) sqlite-file?
I do not think you have any choice, unless you are ready to hack
MTD/JFFS2 - use 512.
--
Best Regards,
Artem Bityutskiy
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 490 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2011-10-19 14:38 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-10-17 8:52 Understanding page size in jffs2- and kernel-source Freise, Bjoern-Achim
2011-10-18 8:32 ` Ricard Wanderlof
2011-10-19 14:37 ` Artem Bityutskiy
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).