public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
* mount costs too long
@ 2006-11-10  7:05 Aubrey
  2006-11-10 11:56 ` Josh Boyer
  0 siblings, 1 reply; 11+ messages in thread
From: Aubrey @ 2006-11-10  7:05 UTC (permalink / raw)
  To: linux-mtd

Hi all,

I wrote a mtd-nand driver and enabled it with YAFFS on 2.6.18.
When I mount the mtd partition of a large page nand chip, everything works fine.
But When I replace the large page nand chip with a small page nand
chip,everything works ok except mount costs about 8 seconds. It's too
long, I think.

The same kernel and driver, the same hardware except the nand part
number( NAND01G and NAND128W), any clue?

Did anyone encounter this issue? Welcome any suggestions!

Thanks,
-Aubrey

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: mount costs too long
  2006-11-10  7:05 mount costs too long Aubrey
@ 2006-11-10 11:56 ` Josh Boyer
  2006-11-10 14:48   ` Aubrey
  0 siblings, 1 reply; 11+ messages in thread
From: Josh Boyer @ 2006-11-10 11:56 UTC (permalink / raw)
  To: Aubrey; +Cc: linux-mtd

On Fri, 2006-11-10 at 15:05 +0800, Aubrey wrote:
> Hi all,
> 
> I wrote a mtd-nand driver and enabled it with YAFFS on 2.6.18.
> When I mount the mtd partition of a large page nand chip, everything works fine.
> But When I replace the large page nand chip with a small page nand
> chip,everything works ok except mount costs about 8 seconds. It's too
> long, I think.

You might try asking on the YAFFS mailing list.  I'm not sure why
changing to a smaller chip would vary the mount time.

josh

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: mount costs too long
  2006-11-10 11:56 ` Josh Boyer
@ 2006-11-10 14:48   ` Aubrey
  2006-11-10 16:08     ` Artem Bityutskiy
  0 siblings, 1 reply; 11+ messages in thread
From: Aubrey @ 2006-11-10 14:48 UTC (permalink / raw)
  To: Josh Boyer; +Cc: linux-mtd

On 11/10/06, Josh Boyer <jwboyer@linux.vnet.ibm.com> wrote:
> On Fri, 2006-11-10 at 15:05 +0800, Aubrey wrote:
> > Hi all,
> >
> > I wrote a mtd-nand driver and enabled it with YAFFS on 2.6.18.
> > When I mount the mtd partition of a large page nand chip, everything works fine.
> > But When I replace the large page nand chip with a small page nand
> > chip,everything works ok except mount costs about 8 seconds. It's too
> > long, I think.
>
> You might try asking on the YAFFS mailing list.  I'm not sure why
> changing to a smaller chip would vary the mount time.
>
I got a clue from YAFFS mailing list, this is a known issue on 2.6.18 kernels.
It is caused by the MTD layer rework and corresponding yaffs-mtd layer
modifications. Namely, an additional translation had to be implemented
for OOB area for 512b page chips.

But I'm not sure what should be changed to fix this issue. Now I'm
using the newest yaffs, should I upgrade mtd in the kernel to the
newest version? ( The kernel I'm using is 2.6.18).

Thanks,
-Aubrey

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: mount costs too long
  2006-11-10 14:48   ` Aubrey
@ 2006-11-10 16:08     ` Artem Bityutskiy
  2006-11-10 16:15       ` Vitaly Wool
  0 siblings, 1 reply; 11+ messages in thread
From: Artem Bityutskiy @ 2006-11-10 16:08 UTC (permalink / raw)
  To: Aubrey; +Cc: linux-mtd

On Fri, 2006-11-10 at 22:48 +0800, Aubrey wrote:
> I got a clue from YAFFS mailing list, this is a known issue on 2.6.18 kernels.
> It is caused by the MTD layer rework and corresponding yaffs-mtd layer
> modifications. Namely, an additional translation had to be implemented
> for OOB area for 512b page chips.

Is it possible to describe this in more details? And why YAFFS people do
not fix this?

-- 
Best regards,
Artem Bityutskiy (Битюцкий Артём)

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: mount costs too long
  2006-11-10 16:08     ` Artem Bityutskiy
@ 2006-11-10 16:15       ` Vitaly Wool
  2006-11-10 16:26         ` Artem Bityutskiy
  0 siblings, 1 reply; 11+ messages in thread
From: Vitaly Wool @ 2006-11-10 16:15 UTC (permalink / raw)
  To: dedekind; +Cc: linux-mtd, Aubrey

Artem Bityutskiy wrote:

>On Fri, 2006-11-10 at 22:48 +0800, Aubrey wrote:
>  
>
>>I got a clue from YAFFS mailing list, this is a known issue on 2.6.18 kernels.
>>It is caused by the MTD layer rework and corresponding yaffs-mtd layer
>>modifications. Namely, an additional translation had to be implemented
>>for OOB area for 512b page chips.
>>    
>>
>
>Is it possible to describe this in more details? And why YAFFS people do
>not fix this?
>
>  
>
This is more a yaffs1 problem rather than MTD's. The thing is that
yaffs1 blindly presumes SmartMedia OOB layout which is untrue for most
flashes, so an additional translation was implemented within yaffs1.

Vitaly

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: mount costs too long
  2006-11-10 16:15       ` Vitaly Wool
@ 2006-11-10 16:26         ` Artem Bityutskiy
  2006-11-10 16:34           ` Vitaly Wool
  0 siblings, 1 reply; 11+ messages in thread
From: Artem Bityutskiy @ 2006-11-10 16:26 UTC (permalink / raw)
  To: Vitaly Wool; +Cc: linux-mtd, Aubrey

On Fri, 2006-11-10 at 19:15 +0300, Vitaly Wool wrote:
> This is more a yaffs1 problem rather than MTD's. The thing is that
> yaffs1 blindly presumes SmartMedia OOB layout which is untrue for most
> flashes, so an additional translation was implemented within yaffs1.
> 
But Aubrey said it is 2.6.18-only, why?

-- 
Best regards,
Artem Bityutskiy (Битюцкий Артём)

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: mount costs too long
  2006-11-10 16:26         ` Artem Bityutskiy
@ 2006-11-10 16:34           ` Vitaly Wool
  2006-11-10 17:01             ` Claudio Lanconelli
  2006-11-10 17:15             ` Artem Bityutskiy
  0 siblings, 2 replies; 11+ messages in thread
From: Vitaly Wool @ 2006-11-10 16:34 UTC (permalink / raw)
  To: dedekind; +Cc: linux-mtd, Aubrey

Artem Bityutskiy wrote:

>On Fri, 2006-11-10 at 19:15 +0300, Vitaly Wool wrote:
>  
>
>>This is more a yaffs1 problem rather than MTD's. The thing is that
>>yaffs1 blindly presumes SmartMedia OOB layout which is untrue for most
>>flashes, so an additional translation was implemented within yaffs1.
>>
>>    
>>
>But Aubrey said it is 2.6.18-only, why?
>
>  
>
B/c due to the MTD layer rework, there's no way now to use custom
oobinfo in yaffs.
Therefore, as yaffs1 presumes the SmartMedia OOB layout one can either
read/write raw OOB but that will most probably break the bad block
handling, or implement a small shim layer putting spare OOB area into
SmartMedia OOB layout or back. Any other way will result in
incompatibility with the older version of yaffs1.

Vitaly

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: mount costs too long
  2006-11-10 16:34           ` Vitaly Wool
@ 2006-11-10 17:01             ` Claudio Lanconelli
  2006-11-10 17:05               ` Vitaly Wool
  2006-11-10 17:15             ` Artem Bityutskiy
  1 sibling, 1 reply; 11+ messages in thread
From: Claudio Lanconelli @ 2006-11-10 17:01 UTC (permalink / raw)
  To: linux-mtd; +Cc: Vitaly Wool

Vitaly Wool wrote:
> B/c due to the MTD layer rework, there's no way now to use custom
> oobinfo in yaffs.
> Therefore, as yaffs1 presumes the SmartMedia OOB layout one can either
> read/write raw OOB but that will most probably break the bad block
> handling, or implement a small shim layer putting spare OOB area into
> SmartMedia OOB layout or back. Any other way will result in
> incompatibility with the older version of yaffs1.
>   
Is there a way to specify SmartMedia OOB layout in the board
driver?
Also ssfdc.c needs SmartMedia OOB layout to work.

Cheers,
Claudio Lanconelli

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: mount costs too long
  2006-11-10 17:01             ` Claudio Lanconelli
@ 2006-11-10 17:05               ` Vitaly Wool
  0 siblings, 0 replies; 11+ messages in thread
From: Vitaly Wool @ 2006-11-10 17:05 UTC (permalink / raw)
  To: Claudio Lanconelli; +Cc: linux-mtd

Claudio Lanconelli wrote:

>Is there a way to specify SmartMedia OOB layout in the board
>driver?
>  
>
Yes. Still I'm not sure if you need to hack nand_base or not.

>Also ssfdc.c needs SmartMedia OOB layout to work.
>
>  
>
It's a separate case AFAIK.

Vitaly

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: mount costs too long
  2006-11-10 16:34           ` Vitaly Wool
  2006-11-10 17:01             ` Claudio Lanconelli
@ 2006-11-10 17:15             ` Artem Bityutskiy
  2006-11-11 14:11               ` Aubrey
  1 sibling, 1 reply; 11+ messages in thread
From: Artem Bityutskiy @ 2006-11-10 17:15 UTC (permalink / raw)
  To: Vitaly Wool; +Cc: linux-mtd, Aubrey

On Fri, 2006-11-10 at 19:34 +0300, Vitaly Wool wrote:
> B/c due to the MTD layer rework, there's no way now to use custom
> oobinfo in yaffs.
> Therefore, as yaffs1 presumes the SmartMedia OOB layout one can either
> read/write raw OOB but that will most probably break the bad block
> handling, or implement a small shim layer putting spare OOB area into
> SmartMedia OOB layout or back. Any other way will result in
> incompatibility with the older version of yaffs1.

OK, as it was said that YAFFS1 becomes much slower, this means that it
reads more data from OOB then if it were working with older kernel.
Right? Why it reads more data?

-- 
Best regards,
Artem Bityutskiy (Битюцкий Артём)

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: mount costs too long
  2006-11-10 17:15             ` Artem Bityutskiy
@ 2006-11-11 14:11               ` Aubrey
  0 siblings, 0 replies; 11+ messages in thread
From: Aubrey @ 2006-11-11 14:11 UTC (permalink / raw)
  To: dedekind; +Cc: linux-mtd, Vitaly Wool

On 11/11/06, Artem Bityutskiy <dedekind@infradead.org> wrote:
> On Fri, 2006-11-10 at 19:34 +0300, Vitaly Wool wrote:
> > B/c due to the MTD layer rework, there's no way now to use custom
> > oobinfo in yaffs.
> > Therefore, as yaffs1 presumes the SmartMedia OOB layout one can either
> > read/write raw OOB but that will most probably break the bad block
> > handling, or implement a small shim layer putting spare OOB area into
> > SmartMedia OOB layout or back. Any other way will result in
> > incompatibility with the older version of yaffs1.
>
> OK, as it was said that YAFFS1 becomes much slower, this means that it
> reads more data from OOB then if it were working with older kernel.
> Right? Why it reads more data?
>

Well, If I understand correctly, this should be a YAFFS issue. I got
the following explaination from YAFFS mailing list:
------------------
 Charles Manning to yaffs, me

On Saturday 11 November 2006 03:53, Vitaly Wool wrote:
> You'll have to do some code hacking to speed things up. I.e. you'll
> need to set up your OOB layout according to SmartMedia spec and then
> you'll be able to remove the translation shim in yaffs code.

It is important to understand this:

The mtd NAND driver is generic code that is parameterised by configuration
tables to make it flexible. This gives an (almost/often) out of the box
experience, and IMHO, is pretty slick code, but there's a cost associated
with the flexibility.

A custom driver can be a lot faster, but then it won't be generic any more.

Most people who want fast NAND speed end up writing their own custom drivers
to maximise ransfer with their hardware.
---------------------

I think I need more time to read source code to understand this. Did
anyone enable yaffs on small page NAND chip on the kernel >= 2.6.18?

-Aubrey

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2006-11-11 14:12 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-11-10  7:05 mount costs too long Aubrey
2006-11-10 11:56 ` Josh Boyer
2006-11-10 14:48   ` Aubrey
2006-11-10 16:08     ` Artem Bityutskiy
2006-11-10 16:15       ` Vitaly Wool
2006-11-10 16:26         ` Artem Bityutskiy
2006-11-10 16:34           ` Vitaly Wool
2006-11-10 17:01             ` Claudio Lanconelli
2006-11-10 17:05               ` Vitaly Wool
2006-11-10 17:15             ` Artem Bityutskiy
2006-11-11 14:11               ` Aubrey

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox