From: hejianet <hejianet@linux.vnet.ibm.com>
To: dedekind1@gmail.com
Cc: linux-mtd@lists.infradead.org
Subject: Re: jffs2 copy too long after mounting
Date: Tue, 23 Oct 2012 15:13:41 +0800 [thread overview]
Message-ID: <508643A5.1020901@linux.vnet.ibm.com> (raw)
In-Reply-To: <1345794797.2848.264.camel@sauron.fi.intel.com>
Hi Artem, thanks for your reply
Now I can reproduce it after 2-3 days stress tests:
1.just do lots of small writing(4k bytes each time) radomly in one of 1000
thousand file
2.remove the 1000 files,now the jffs2 fs is *very* dirty.
3.I dynamically increase the threshold nr_free_blocks to trigger the gc
in jffs2_thread_should_wake():
if (c->nr_free_blocks + c->nr_erasing_blocks < c->resv_blocks_gctrigger &&
(dirty > c->nospc_dirty_size))
ret = 1;
4. I watched after a while, there were tens of thousands of lines (I enable the
jffs2 log level to be 1)
Check potential deletion dirent at 008ddd24
Check potential deletion dirent at 008ddcf4
Check potential deletion dirent at 008ddcc4
Check potential deletion dirent at 008ddc68
Check potential deletion dirent at 008dca34
Check potential deletion dirent at 008dca04
Check potential deletion dirent at 0088d77c
Check potential deletion dirent at 0088d74c
Check potential deletion dirent at 0088d71c
Check potential deletion dirent at 0088d6ec
Check potential deletion dirent at 0088d6bc
Check potential deletion dirent at 0088c648
Check potential deletion dirent at 0088c618
Check potential deletion dirent at 0088c2a8
Check potential deletion dirent at 0088c278
Check potential deletion dirent at 0088c248
Check potential deletion dirent at 0088c218
Check potential deletion dirent at 0088c1e8
Check potential deletion dirent at 00886b50
Check potential deletion dirent at 00885388
Check potential deletion dirent at 00885358
Check potential deletion dirent at 008852a8
Check potential deletion dirent at 00885278
5. I did find that the free blocks number of jffs2 is very slowly increased
So could you give me any ideas, it is normal or abnormal?
Thanks a lot
On 2012-08-24 15:53, Artem Bityutskiy wrote:
> On Thu, 2012-08-02 at 11:04 +0800, hejianet wrote:
>> hi All
>> my kernel is 2.6.16
>> after mounting the nand flash with jffs2 partition, the first copy operation
>> for a 15M file(from jffs2 partition to jffs2 partition) take 9
>> minutes,but the
>> second copy operation takes 1 minutes.
>> the disk usage(df result) is over 85%.
>> I wonder is there any patch ported to such old kernel?
> His is because how JFFS2 is designed. When the mount operation is
> finished, JFFS2 does not really finish mounting. There is the background
> process which keeps working - it basically reads all files in the system
> and checks the CRC, which is needed to find out which nodes are new and
> which are obsolete.
>
> So what happens is that you mount JFFS2, the background thread keeps
> working (see 'top' for example).
>
> While the background thread works, you can read files. But you cannot
> write - writes will be blocked. Well, it is a bit more complex - you can
> write a little, but from some point your writes will be blocked until
> the background thread finishes. Then the write will continue and finish.
>
> In you case, you mount, start writing your 15MiB file, write gets
> blocked, waits for the background thread, then continues write. The
> background thread takes ages to finish on big partitions.
>
> The second write is fast because you do not wait for the background
> thread any longer.
>
next prev parent reply other threads:[~2012-10-23 7:14 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-08-02 3:04 jffs2 copy too long after mounting hejianet
2012-08-02 3:16 ` hejianet
2012-08-06 22:54 ` Brian Norris
2012-08-02 5:58 ` hejianet
2012-08-06 23:02 ` Brian Norris
2012-08-09 5:31 ` hejianet
2012-08-24 7:53 ` Artem Bityutskiy
2012-10-23 7:13 ` hejianet [this message]
2012-11-12 15:35 ` Artem Bityutskiy
[not found] <50881109.3010107@linux.vnet.ibm.com>
2012-10-25 1:41 ` hejianet
2012-10-26 1:45 ` hejianet
2012-11-12 15:42 ` 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=508643A5.1020901@linux.vnet.ibm.com \
--to=hejianet@linux.vnet.ibm.com \
--cc=dedekind1@gmail.com \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.