public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
From: "Kai-Uwe Bloem" <kai-uwe.bloem@auerswald.de>
To: linux-mtd@lists.infradead.org
Subject: Why erase_pending_blocks in write_super? (was: [PATCH] JFFS2: Erase max 3 EB's in ...)
Date: Fri, 12 Feb 2010 11:32:04 +0000	[thread overview]
Message-ID: <DIIE.00001DD8002443BF@mail.auerswald.de> (raw)

Hi,

I have been in touch with Joakim and Artem about this for some mails, but now I would like to ask the jffs2 experts about this.

Is jffs2_erase_pending_blocks real the right thing to do in jffs_write_super?

First, there's nothing like a super block in JFFS2, and the linux kernel's VFS documentation states that jffs2_write_super is an optional method. Hence, I think it's not technically necessary to have this method for jffs2.

>From Artem I learned that it was once introduced to flush the write buffer, using the timers in the VFS layers instead of implementing local timers in jffs2. That's a good explanation for having an implementation of write_super at all.

I can also understand why there is a GC trigger here. GC is an optimization, and as such it should be triggered often enough for it do do the work.

But, why is this jffs_erase_pending_blocks in there?

In NOR case, after having rm'ed a large file, there are possibly a load of blocks on the pending list. The effect I notice is the same as Joakim noticed: after the rm, the system blocks for a while. Depending on the size of the file, this "while" might be rather long. I measured up to 30 seconds, which wreaks havoc with the innards of our userland software. And no, I can't change this by altering the process priority.

So, can you please enlighten me? What's the advantage of having the pending list erased in write_super? Can I possibly remove it without experiencing other problems?
--

             reply	other threads:[~2010-02-12 11:32 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-02-12 11:32 Kai-Uwe Bloem [this message]
2010-02-12 12:30 ` Why erase_pending_blocks in write_super? (was: [PATCH] JFFS2: Erase max 3 EB's in ...) Joakim Tjernlund
2010-02-12 12:59   ` Artem Bityutskiy
2010-02-13 13:35     ` Joakim Tjernlund
     [not found]     ` <OFB070621F.38B903A2-ONC12576C9.004A7C7A-C12576C9.004A9FC9@LocalDomain>
2010-02-15  9:58       ` 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=DIIE.00001DD8002443BF@mail.auerswald.de \
    --to=kai-uwe.bloem@auerswald.de \
    --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