From: Artem Bityutskiy <dedekind1@gmail.com>
To: Nicholas <ciliwung36@gmail.com>
Cc: linux-mtd@lists.infradead.org
Subject: Re: UBI memory usage on large page nand
Date: Fri, 01 Apr 2011 18:31:50 +0300 [thread overview]
Message-ID: <1301671910.2789.98.camel@localhost> (raw)
In-Reply-To: <AANLkTik5qKMM3onfv=wsJFFHhO4t0C_8gAXUoGca2fKE@mail.gmail.com>
Hi,
I agree UBI/UBIFS uses more memory than it could. There is some room for
optimizations.
On Thu, 2011-03-31 at 11:07 +0800, Nicholas wrote:
> Hi there,
>
> I've a short of memory usage issue while using large page size of nand flash.
> Before, i was using 2KB page size of nand flash, i found UBI/UBIFS memory
> consumption on normal zone are :
>
> 7 0xC0180858: 1024K, ubi_attach_mtd_de,
> 8 0xC0180834: 1024K, ubi_attach_mtd_de,
> 9 0xC00ED300: 1008K, ubifs_get_sb,
> 10 0xC00ED31C: 1008K, ubifs_get_sb,
> 11 0xC00FE7EC: 1008K, ubifs_lpt_init,
> 11 0xC00F95AC: 1008K, ubifs_mount_orpha,
>
> Then, i'm using 8KB page size of nand flash, and found the result as below :
> 4 0xC0180858: 4096K, ubi_attach_mtd_de,
> 5 0xC0180834: 4096K, ubi_attach_mtd_de,
> 6 0xC00FE7EC: 4064K, ubifs_lpt_init,
> 7 0xC00ED31C: 4064K, ubifs_get_sb,
> 8 0xC00F95AC: 4064K, ubifs_mount_orpha,
> 9 0xC00ED300: 4064K, ubifs_get_sb,
>
> My environment contains 2 mtd partitions for UBI.
>
> Before, it took 6MB of memory consumption and now it takes 24MB.
> Do you have any suggestion how to reduce the memory consumption since dram size
> is pretty limited for other usage.
I think this is mainly because your eraseblock size became larger. UBI
and UBIFS allocate many buffers of eraseblock size for various purposes.
The buffers are often allocated once on attach/mount and released only
on detach/unmount. All of these buffers are allocated with vmalloc()
call, so you can find them by grepping.
The simplest thing you can try is to allocate these buffers when they
are actually needed, and then free them when they are not needed. This
should help.
--
Best Regards,
Artem Bityutskiy (Артём Битюцкий)
next prev parent reply other threads:[~2011-04-01 15:34 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <AANLkTi=GsmJOjurETG930t-TW7uXLR1M6yKXWBSk7ebV@mail.gmail.com>
2011-03-31 3:07 ` UBI memory usage on large page nand Nicholas
2011-04-01 15:31 ` Artem Bityutskiy [this message]
2011-04-15 9:23 ` Nicholas
2011-04-15 13:13 ` Artem Bityutskiy
2011-04-15 13:17 ` Artem Bityutskiy
2011-04-15 13:24 ` Artem Bityutskiy
2011-04-17 9:03 ` Nicholas
2011-04-17 9:16 ` Artem Bityutskiy
2011-04-18 8:29 ` Nicholas
2011-04-18 8:39 ` Artem Bityutskiy
2011-04-20 3:19 ` Nicholas
2011-04-20 7:30 ` Artem Bityutskiy
2011-08-17 6:35 ` Nicholas
2011-08-20 5:17 ` Artem 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=1301671910.2789.98.camel@localhost \
--to=dedekind1@gmail.com \
--cc=ciliwung36@gmail.com \
--cc=linux-mtd@lists.infradead.org \
/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).