From: "Albrecht Dreß" <albrecht.dress@arcor.de>
To: linux-mtd@lists.infradead.org
Subject: Q: jffs2 startup slow-down / cleanup
Date: Wed, 24 Apr 2013 21:32:38 +0200 [thread overview]
Message-ID: <1366831965.2912.0@antares> (raw)
[-- Attachment #1: Type: text/plain, Size: 1943 bytes --]
Hi all,
I use a PPC-based system, running kernel 3.2.41, including a 512 kByte NV RAM chip which is integrated as mtd-ram with a JFFS2 file system with lzo compression. In fs/jffs2/background.c, I found the note
/* Problem - immediately after bootup, the GCD spends a lot
* of time in places like jffs2_kill_fragtree(); so much so
* that userspace processes (like gdm and X) are starved
* despite plenty of cond_resched()s and renicing. Yield()
* doesn't help, either (presumably because userspace and GCD
* are generally competing for a higher latency resource -
* disk).
The first task I launch activates the hardware watchdog of the system, and accesses data on the NV RAM. When the NV RAM is newly initialised, everything works fine, i.e. a high load after booting is visible only for a very short period (<< 1 second).
I then create, modify and erase files on that file system, and apparently the time needed increases with each boot (I observed about 3-4 seconds) - up to a point where the user space process is too slow the trigger the wdt properly. Thus, the system is rebooted by the wdt, which again checks the JFFS2 in background, and the wdt triggers... The only remedy in this situation is to erase the NV RAM by removing the buffer battery.
I could add a delay between mounting the NV RAM and starting my main application, but of course this is not desirable, as the system should come up as quick as possible. The alternative would be waiting until the background task has finished, or to regularly "clean up" the jffs2.
My questions:
- Is it possible to detect (e.g. through sysfs) when the background task has finished, so it's safe to activate the WDT (i.e. optimise the delay between mount and wdt activation)?
- Is it possible to clean/re-organise the jffs2 so the background process needs less time (optimal: a constant time) after booting?
Thanks in advance,
Albrecht.
[-- Attachment #2: Type: application/pgp-signature, Size: 190 bytes --]
reply other threads:[~2013-04-24 20:05 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=1366831965.2912.0@antares \
--to=albrecht.dress@arcor.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