* impact of 2X_PROGRAM on read operations
@ 2011-06-06 12:12 David Wagner
2011-06-06 14:32 ` Artem Bityutskiy
0 siblings, 1 reply; 4+ messages in thread
From: David Wagner @ 2011-06-06 12:12 UTC (permalink / raw)
To: linux-mtd; +Cc: kmpark
Hello,
I have been trying to understand what does the 2X_PROGRAM configuration
(and the IS_2PLANE macro).
At first, I was confused to see that, in onenand_command(), when the
command is "READ", the IS_2PLANE macro modifies the block and page
address. I was expecting this option only to affect program operations.
Then, after seeing jffs2 not finding its magic bitmask after switching
the 2X_PROGRAM configuration off, I understood that, since the 2X
Program only programs one OOB for two blocks, the read operations had to
be impacted anyway.
So, is the following right/almost/wrong ?
Let the size of physical pages/block sizes be 2KiB/128KiB
A filesystem on top of a 2X_PROGRAM-enabled mtd layer sees 4KiB-big
pages. When this FS wants to read one 4KiB page, the mtd layer will read
2KiB pages, two times. The layout of the blocks and pages is:
Even plane Odd plane
+--------------------+--------------------+
| page 0 | page 1 (oob 0&1)| <--- one logical page
| page 2 | page 3 (oob 2&3)| as seen by a filesystem
| page 4 | page 5 (oob 4&5)|
| . | . |
| . | . |
| . | . |
| (Block 0) | (Block 1) |
+--------------------+--------------------+
| page 128 | page 129 (oob) |
| . | . |
| . | . |
| . | . |
| (Block 2) | (Block 3) |
+--------------------+--------------------+
(the page number is not the one that would be computed within
onenand_command but indicates the order in which pages get read or
programmed.)
Is there a way to safely read without 2X_PROGRAM enabled once it has
been flashed with a 2X_PROGRAM-enabled flasher (e.g. patched u-boot).
Regards,
David Wagner.
--
David Wagner, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: impact of 2X_PROGRAM on read operations
2011-06-06 12:12 impact of 2X_PROGRAM on read operations David Wagner
@ 2011-06-06 14:32 ` Artem Bityutskiy
2011-06-09 12:44 ` David Wagner
0 siblings, 1 reply; 4+ messages in thread
From: Artem Bityutskiy @ 2011-06-06 14:32 UTC (permalink / raw)
To: David Wagner; +Cc: kmpark, linux-mtd
On Mon, 2011-06-06 at 14:12 +0200, David Wagner wrote:
> Is there a way to safely read without 2X_PROGRAM enabled once it has
> been flashed with a 2X_PROGRAM-enabled flasher (e.g. patched u-boot).
Not sure about u-boot, but AFAIK 2x is a completely separate mode which
gives you I/O speed-up but makes things incompatible with "normal" mode.
E.g., you can mount JFFS2 only in one of the modes.
--
Best Regards,
Artem Bityutskiy (Артём Битюцкий)
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: impact of 2X_PROGRAM on read operations
2011-06-06 14:32 ` Artem Bityutskiy
@ 2011-06-09 12:44 ` David Wagner
2011-06-09 13:01 ` Kyungmin Park
0 siblings, 1 reply; 4+ messages in thread
From: David Wagner @ 2011-06-09 12:44 UTC (permalink / raw)
To: dedekind1; +Cc: linux-mtd, kmpark
On 06/06/2011 04:32 PM, Artem Bityutskiy wrote:
> On Mon, 2011-06-06 at 14:12 +0200, David Wagner wrote:
>> Is there a way to safely read without 2X_PROGRAM enabled once it has
>> been flashed with a 2X_PROGRAM-enabled flasher (e.g. patched u-boot).
>
> Not sure about u-boot, but AFAIK 2x is a completely separate mode which
> gives you I/O speed-up but makes things incompatible with "normal" mode.
> E.g., you can mount JFFS2 only in one of the modes.
>
Ok, so I guess it doesn't make sense trying to address the issue of
incompatibilities.
I may have to check once again, but I'm pretty sure, however, that I
managed to flash a UBI image with a 2X_PROGRAM-enabled u-boot and read
it with a regular kernel. The u-boot code for 2X_PROGRAM handling seems
to basically be a copy-paste from the kernel.
If the diagram in my first mail is correct, that could not be possible.
Kyungmin, do you know what's wrong in my reasoning ?
Regards,
David Wagner.
--
David Wagner, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: impact of 2X_PROGRAM on read operations
2011-06-09 12:44 ` David Wagner
@ 2011-06-09 13:01 ` Kyungmin Park
0 siblings, 0 replies; 4+ messages in thread
From: Kyungmin Park @ 2011-06-09 13:01 UTC (permalink / raw)
To: David Wagner; +Cc: linux-mtd, dedekind1
On Thu, Jun 9, 2011 at 9:44 PM, David Wagner
<david.wagner@free-electrons.com> wrote:
> On 06/06/2011 04:32 PM, Artem Bityutskiy wrote:
>> On Mon, 2011-06-06 at 14:12 +0200, David Wagner wrote:
>>> Is there a way to safely read without 2X_PROGRAM enabled once it has
>>> been flashed with a 2X_PROGRAM-enabled flasher (e.g. patched u-boot).
>>
>> Not sure about u-boot, but AFAIK 2x is a completely separate mode which
>> gives you I/O speed-up but makes things incompatible with "normal" mode.
>> E.g., you can mount JFFS2 only in one of the modes.
>>
>
> Ok, so I guess it doesn't make sense trying to address the issue of
> incompatibilities.
>
> I may have to check once again, but I'm pretty sure, however, that I
> managed to flash a UBI image with a 2X_PROGRAM-enabled u-boot and read
> it with a regular kernel. The u-boot code for 2X_PROGRAM handling seems
> to basically be a copy-paste from the kernel.
> If the diagram in my first mail is correct, that could not be possible.
>
> Kyungmin, do you know what's wrong in my reasoning ?
Since we don't know how program hen 2x_program mode. even though
logically BufferRAM0 data will be located block even, BufferRAM1 will
be copied to block odd. but it's not clear.
Can you tried to program the sample 4KiB data when 2X_PROGRAM and read
(block even, page n) and read (block odd, page n) and compare it? then
you can find a difference.
I'm not tried to compare the compatible issue between normal and 2x mode.
Thank you,
Kyungmin Park
>
>
> Regards,
> David Wagner.
> --
> David Wagner, Free Electrons
> Kernel, drivers, real-time and embedded Linux
> development, consulting, training and support.
> http://free-electrons.com
>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2011-06-09 13:01 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-06-06 12:12 impact of 2X_PROGRAM on read operations David Wagner
2011-06-06 14:32 ` Artem Bityutskiy
2011-06-09 12:44 ` David Wagner
2011-06-09 13:01 ` Kyungmin Park
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).