public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
From: Artem Bityutskiy <dedekind1@gmail.com>
To: Bastian.Ruppert@sewerin.de
Cc: Grant Erickson <marathon96@gmail.com>, linux-mtd@lists.infradead.org
Subject: Re: ubiformat: libmtd: error 12 (Cannot allocate memory): on system with limited RAM
Date: Thu, 07 Apr 2011 13:34:18 +0300	[thread overview]
Message-ID: <1302172458.2407.24.camel@localhost> (raw)
In-Reply-To: <OF8FD344E7.A0857714-ONC125786B.003837F9-C125786B.0038E3D1@sewerin.de>

On Thu, 2011-04-07 at 12:20 +0200, Bastian.Ruppert@sewerin.de wrote:
> Hello,
> 
> i have problems writing an image with ubiformat in an environment with 
> limited RAM.
> 
> The system is a TI OMAPL138 ARM9 with a 2.6.38-rc6-00071-gb9b65a4 kernel.
> 
> git log in mtd-utils:
> commit a70811466de2c4c0c3a538e5e04a4dd1a8fbcc03
> Author: Andy Shevchenko <ext-andriy.shevchenko@nokia.com>
> Date:   Tue Apr 5 17:32:29 2011 +0300
> 
> 
> The following command is working fine with say MEM=72M for the linux 
> kernel, and 
> the content in the ubi image can be mounted successfully after flashing.
> 
> ./ubiformat /dev/mtd3 -f image.ubi -S 19660800
> 
> But with less memory, say 32M the following error occurs:
> 
> -bash-3.2# ./ubiformat /dev/mtd3 -f image.ubi -S 19660800
> ubiformat: mtd3 (nand), size 79691776 bytes (76.0 MiB), 608 eraseblocks of 
> 131072 bytes (128.0 KiB), min. I/O size 2048 bytes
> libscan: scanning eraseblock 607 -- 100 % complete 
> ubiformat: 607 eraseblocks have valid erase counter, mean value is 3
> ubiformat: 1 eraseblocks are supposedly empty
> ubiformat: flashing eraseblock 35 -- 24 % complete  ubiformat: page 
> allocation failure. order:5, mode:0x40d0
> [<c0034838>] (unwind_backtrace+0x0/0xf0) from [<c007f730>] 
> (__alloc_pages_nodemask+0x590/0x60c)
> [<c007f730>] (__alloc_pages_nodemask+0x590/0x60c) from [<c007f7c0>] 
> (__get_free_pages+0x14/0x44)
> [<c007f7c0>] (__get_free_pages+0x14/0x44) from [<c01e2db4>] 
> (mtd_write+0x8c/0x230)
> [<c01e2db4>] (mtd_write+0x8c/0x230) from [<c00a38f8>] 
> (vfs_write+0xb0/0x13c)
> [<c00a38f8>] (vfs_write+0xb0/0x13c) from [<c00a3e8c>] 
> (sys_write+0x3c/0x68)
> [<c00a3e8c>] (sys_write+0x3c/0x68) from [<c002ffa0>] 
> (ret_fast_syscall+0x0/0x2c)

This is an allocation failure inside the kernel, in mtd_write(). This is
exactly what Grant Erickson is fixing. He sent the patch recently, but I
found few minor issue and asked him to re-send.

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

  reply	other threads:[~2011-04-07 10:37 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-07 10:20 ubiformat: libmtd: error 12 (Cannot allocate memory): on system with limited RAM Bastian.Ruppert
2011-04-07 10:34 ` Artem Bityutskiy [this message]
2011-04-08 14:02 ` 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=1302172458.2407.24.camel@localhost \
    --to=dedekind1@gmail.com \
    --cc=Bastian.Ruppert@sewerin.de \
    --cc=linux-mtd@lists.infradead.org \
    --cc=marathon96@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