public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
From: Artem Bityutskiy <dedekind1@gmail.com>
To: Norbert van Bolhuis <nvbolhuis@aimvalley.nl>
Cc: linux-mtd <linux-mtd@lists.infradead.org>
Subject: Re: a UBIFS image makes task pdflush blocked > 120 seconds
Date: Wed, 14 Oct 2009 11:56:40 +0300	[thread overview]
Message-ID: <1255510600.32489.130.camel@localhost> (raw)
In-Reply-To: <4AD30069.8060101@aimvalley.nl>

On Mon, 2009-10-12 at 12:09 +0200, Norbert van Bolhuis wrote:
> Artem Bityutskiy wrote:
> > On Fri, 2009-10-09 at 15:02 +0200, Norbert van Bolhuis wrote:
> >> We're using a 19MB UBIFS image (preprogrammed by manufacturing)
> >> for a 156 MB NOR flash partition.
> > 
> > Wow, really huge NOR. Keep in mind that we have not tested UBIFS
> > for NOR well enough.
> It's a MTD_CONCATENATED 128MB NOR flash + 28MB NOR flash partition.
> ok, that's good to realize.
> Are there any (more) thorough UBIFS tests scheduled for NOR flash ?

Not by us. But you may do this. Although, I did test power-cut recovery
for NOR recently. This was on the "Kilauea" board.

> >> This message repeats once. Apart from the message everything is
> >> functioning OK.
> >> so it's the UBIFS commit_sem that's causing this.
> > 
> > Not the semaphore itself, but it is locked for too long time and we
> > cannot acquire it for too long. Since make_reservation needs it only
> > in read mode, it is obvious that the it is is locked somewhere in
> > the commit code, which is strange.
> > 
> > How full if the FS when this happens? What is your eraseblock size?
> > 
> 
> The UBIFS image contains only 1 file (of 18MB) and a few directories. Several
> application processes create (small) files and make modifications. I guess that
> the FS contains only 20MB.
> PEB-size = 131072, LEB-size = 130944

Hmm, then GC should have almost no work to do.

> >> We're using linux-2.6.28. The linux-next backport for 2.6.28
> >> (from git://git.infradead.org/~dedekind/ubifs-v2.6.28.git) changes
> >> are in.
> >>
> >> I guess that, initially, there's a lot of work to be done
> >> for UBI. I'm thinking about scan entire 156MB, add UBI VID/EC headers
> >> for the empty 137MB, make LEB mappings, etc..
> >>
> >> I don't understand why this would block UBIFS/pdflush.
> > 
> > It shouldn't. UBI spends time for scanning when you attach your flash.
> > You pay the price at the very beginning, and then it should be fast.
> > 
> 
> but, this "problem" does occur (~ 1 minute after) the very beginning (when power is
> applied for the 1st time to the board).

OK.

> > What I suggest you is to inject some code to UBIFS which measures for
> > how long the 'commit_sem' is locked in "write" mode, and find the times.
> > Then try to investigate why this actually happens. I cannot tell why
> > this could be, off the top of my head.
> > 
> 
> ok, will do that. I'll track commit_sem, io_mutex and ubifs_garbage_collect().
> I'll report back.
> 
> Btw. stackdump is the same (2 out of 2 times).

OK. I really do not have any idea off the top of my head now, sorry.
Try to investigate this a beet deeper.

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

  reply	other threads:[~2009-10-14  8:56 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-10-09 13:02 a UBIFS image makes task pdflush blocked > 120 seconds Norbert van Bolhuis
2009-10-11 13:52 ` Artem Bityutskiy
2009-10-12 10:09   ` Norbert van Bolhuis
2009-10-14  8:56     ` Artem Bityutskiy [this message]
2009-11-11 15:54       ` Norbert van Bolhuis
2009-11-13  8:20         ` Artem Bityutskiy
2009-11-13 15:09           ` Norbert van Bolhuis
2009-11-13 15:52             ` Artem Bityutskiy
2009-11-13 15:56               ` Artem Bityutskiy
2009-11-13 16:28               ` Joakim Tjernlund
2009-10-11 14:04 ` Artem Bityutskiy
2009-10-11 14:09   ` Artem Bityutskiy
     [not found] <34637.10.10.0.184.1258202287.squirrel@intranet.aimsys.nl>
2009-11-16  8:13 ` Artem Bityutskiy
2009-11-16  8:53   ` Joakim Tjernlund
2009-11-16 23:22     ` Jamie Lokier
2009-11-17  8:31       ` Joakim Tjernlund
2009-11-17 10:45       ` Norbert van Bolhuis
     [not found] <4B012D0D.4080500@aimvalley.nl>
2009-11-16 12:12 ` Joakim Tjernlund
2009-11-17  8:25 ` Artem Bityutskiy
2009-11-17 16:25   ` Norbert van Bolhuis
2009-11-18  8:28     ` Artem Bityutskiy
2009-11-18  9:26       ` Norbert van Bolhuis
2009-11-18  9:40         ` Artem Bityutskiy
2009-11-18 10:38           ` Joakim Tjernlund
2009-11-18 10:54             ` Artem Bityutskiy
2009-11-18 10:59               ` Norbert van Bolhuis
2009-11-18 11:01               ` Joakim Tjernlund

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=1255510600.32489.130.camel@localhost \
    --to=dedekind1@gmail.com \
    --cc=linux-mtd@lists.infradead.org \
    --cc=nvbolhuis@aimvalley.nl \
    /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