From: David Woodhouse <dwmw2@infradead.org>
To: "Steve Tsai" <startec@ms11.hinet.net>
Cc: jffs-dev@axis.com
Subject: Re: About GC
Date: Fri, 13 Sep 2002 08:58:46 +0100 [thread overview]
Message-ID: <11218.1031903926@redhat.com> (raw)
In-Reply-To: <002d01c25ad8$5a39d310$80d1a8c0@synso.com.tw>
(redirected to jffs list)
startec@ms11.hinet.net said:
> The recent CVS code has a great improvement at mounting time. It's
> great. I test it with the 32Mbytes NAND flash and the mounting time
> reduce to 10 seconds(the original time is 50 seconds). After mounting,
> I found that the GC thread will take the most CPU time(99.9) in my
> system for a while. How can I make jffs2_garbage_collection_pass to
> reduce CPU time?
I just realised that the long mail I just composed on GC performance isn't
actually related to your question :) But I'm going to send it anyway. First
though, I'll answer the question.
Aside from GC, the GC thread is now _also_ going through the flash doing all
the CRC checks that the scan code used to do. The main difference is that
you don't have to wait for it. You can even write to the file system before
it's finished -- you just can't do any GC. So as long as the GC thread was
staying ahead of you making enough space before you rebooted, you'll be
able to do some writing before you catch up to it again afterwards.
While it's doing that, it _should_ be being fairly nice and yielding
to other processes which want the CPU. Perhaps the code in
jffs2_get_inode_nodes() doesn't do that, come to think of it -- sticking a
cond_resched() in there can't go amiss.
If you want to get an app running really quickly after boot, mount the
rootfs readonly, and the GC thread won't start. Then you can get your app
started and remount read/write, and the GC thread will start up. Or mount
read/write and send the GC thread a SIGSTOP till you want it to go on.
I suspect just identifying the places where it needs a cond_resched() would
probably be sufficient though.
--
dwmw2
next prev parent reply other threads:[~2002-09-13 7:59 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-09-13 3:47 About GC Steve Tsai
2002-09-13 7:58 ` David Woodhouse [this message]
2002-09-13 7:59 ` David Woodhouse
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=11218.1031903926@redhat.com \
--to=dwmw2@infradead.org \
--cc=jffs-dev@axis.com \
--cc=startec@ms11.hinet.net \
/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