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: Fri, 13 Nov 2009 17:56:37 +0200 [thread overview]
Message-ID: <1258127797.21596.1263.camel@localhost> (raw)
In-Reply-To: <1258127530.21596.1260.camel@localhost>
On Fri, 2009-11-13 at 17:52 +0200, Artem Bityutskiy wrote:
> On Fri, 2009-11-13 at 16:09 +0100, Norbert van Bolhuis wrote:
> > OK, so now I understand commit_sem is a RW semaphore which can be acquired multiple
> > times by readers but only once for writers. I failed to see that initially.
> > I think this problem is not related to the commit_sem though.
>
> OK.
>
> > I changed the logging a bit and added the PID info.
> > The problem is indeed caused by a third task holding the "MTD chip lock". This
> > blocks the application which is blocking pdflush.
>
> OK.
>
> > This 3rd task is the UBI background thread. It starts to erase many NOR PEBs very soon.
>
> The only reason I see why it would do this is because you attach an
> empty flash to UBI. In this case, UBI has to format it. And it is doing
> the formatting asynchronously, in the background thread.
And of course, it is trivial to implement a way for userspace "flush"
UBI work queue, which means you can open the UBI device, call 'fsync()',
and be blocked until it is formatted. It is not implemented, but it is
very easy to do.
--
Best Regards,
Artem Bityutskiy (Артём Битюцкий)
next prev parent reply other threads:[~2009-11-13 15: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
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 [this message]
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=1258127797.21596.1263.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