public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
From: "Artem B. Bityutskiy" <dedekind@yandex.ru>
To: Marteo Tim <tim.marteo@gmail.com>
Cc: linux-mtd@lists.infradead.org
Subject: Re: about using UBI on MLC Nand flash
Date: Fri, 28 Jul 2006 11:18:49 +0400	[thread overview]
Message-ID: <44C9BA59.7030006@yandex.ru> (raw)
In-Reply-To: <91b24a870607272033n1fa43a45vb523982186708f8e@mail.gmail.com>

Hello Tim,

Marteo Tim wrote:
> I noticed that UBI need to write 2 times at 1st page in 1 block, one
> for EC header, and the other for VID header. But it is not suitable
> for MLC NAND flash, which only can write once per page. And by
> default, MTD's nand_write can only write page-aligned data.
> Although we can set the module parameter vid_hdr_offsets to the 2nd
> page, but it will occupy more flash space. It is in a dilemma. :(

I wonder, what's your flash What's the NAND page size of your flash?

unfortunately, I failed to find any MLC NAND flash manual to read about
it. If you could send me one, I'd be grateful. Or URL? Is it only
Toshiba who produce them?

Is this a feature of MLC NANDs or this is just MTD which does not
support multiple writes? For example, Samsung SLC flashes *do* support 4
writes per NAND page, but MTD *does not* support this so far (but there
is a plan to implement this).

And it is strange if UBI tries to write to one NAND page twice at your
case. By default it should not, granted mtd->writesize is correct in
your case.

I guess you read at UBI-FAQ? FYI:

-------------------
"How much flash space do UBI headers consume?

This depends on the flash flash you are using. Both EC and VID headers
take 64 bytes, so in case of NOR flash UBI headers consume 128 bytes,
and the logical eraseblock size is equivalent to the physical eraseblock
size minus 128 bytes. But the situation may be different in case of
other flash types.

As it is noted here , UBI writes twice to the flash, not just both UBI
headers in one go. But many flashes have a notion of the "minimal
Input/Output unit size". For example, in case of NAND flash it is
typically equivalent to the NAND page size, which is either 512 bytes or
2KiB. In this case, the EC header would be situated at the first NAND
page, the VID header - at the second NAND page, and both headers would
take two NAND pages (1KiB or 4KiB). The situation is similar in case of
other flash types.

Implementation-wise, UBI just looks at the writesize field of the struct
mtd_info MTD device description object and uses it as the min. I/O unit
when calculating sizes and positions of UBI headers.

Fortunately, many NAND flashes allow several (typically 4) write
operations to one NAND page. Thus, say, in case of a Samsung flash with
2KiB NAND pages one may fit UBI headers at the first two 512-byte chunks
of the NAND page. But this must be supported by the MTD flash driver
(writesize has to be 512 bytes, not 2KiB)."
-------------------

-- 
Best Regards,
Artem B. Bityutskiy,
St.-Petersburg, Russia.

  reply	other threads:[~2006-07-28  7:25 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-07-28  3:33 about using UBI on MLC Nand flash Marteo Tim
2006-07-28  7:18 ` Artem B. Bityutskiy [this message]
2006-07-31  9:05   ` Marteo Tim
2006-07-31  9:13     ` Vitaly Wool
2006-07-31  9:19     ` Artem B. Bityutskiy

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=44C9BA59.7030006@yandex.ru \
    --to=dedekind@yandex.ru \
    --cc=linux-mtd@lists.infradead.org \
    --cc=tim.marteo@gmail.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