[prev in list] [next in list] [prev in thread] [next in thread] 

List:       yaffs
Subject:    Re: [Yaffs] When yaffs perform GC?
From:       Peter Pilley <peter.pilley () gmail ! com>
Date:       2011-08-02 21:28:35
Message-ID: CAN06MJrEWSMZmnu1+Kb3-wrcEvLLCTD=bs2DJiJ+iJPGtJW0SQ () mail ! gmail ! com
[Download RAW message or body]

there is a description of the conditions that GC will activate in
HowYaffsWorks from memory.



On Wed, Aug 3, 2011 at 9:17 AM, Charles Manning <manningc2@actrix.gen.nz>wrote:

> On Wednesday 03 August 2011 02:20:32 you wrote:
> > Hi,
> >
> > I saw those code:
> > if (!dev->is_checkpointed) {
> > urgency = yaffs_bg_gc_urgency(dev);
> > gc_result = yaffs_bg_gc(dev, urgency);
> > if (urgency > 1)
> > next_gc = now + HZ / 20 + 1;
> > else if (urgency > 0)
> > next_gc = now + HZ / 10 + 1;
> > else
> > next_gc = now + HZ * 2;
> > }
> >
> > Does it means yaffs will perform gc at least HZ*2? I mean nomorlly the HZ
> > is around 1sec, does the gc frequence too often? Thank you.
>
> It will only do the gc checking this often.
>
> That does not necessarily mean actual gc will happen.
>
> >
> > > From: manningc2@actrix.gen.nz
> > > To: yaffs@lists.aleph1.co.uk
> > > Date: Tue, 2 Aug 2011 09:48:56 +1200
> > > Subject: Re: [Yaffs] When yaffs perform GC?
> > >
> > > On Tuesday 02 August 2011 04:10:11 HuangAlex wrote:
> > > > Hi guys,
> > > >
> > > > I wonder when yaffs2 perform garbage collection, is every time power
> > > > on/off the device or just perform gc when the reseved blocks is less
> > > > than some specific value. Thank you.
> > >
> > > Have you read HowYaffsWorks?
> > >
> > > If you look at yaffs_guts.c and search for garbage or gc you will see
> the
> > > conditions under which gc is done.
> > >
> > > -- CHarles
> > >
> > > _______________________________________________
> > > yaffs mailing list
> > > yaffs@lists.aleph1.co.uk
> > > http://lists.aleph1.co.uk/cgi-bin/mailman/listinfo/yaffs
>
>
>
> _______________________________________________
> yaffs mailing list
> yaffs@lists.aleph1.co.uk
> http://lists.aleph1.co.uk/cgi-bin/mailman/listinfo/yaffs
>

[Attachment #3 (text/html)]

there is a description of the conditions that GC will activate in HowYaffsWorks from \
memory.<div><br></div><div><br><br><div class="gmail_quote">On Wed, Aug 3, 2011 at \
9:17 AM, Charles Manning <span dir="ltr">&lt;<a \
href="mailto:manningc2@actrix.gen.nz">manningc2@actrix.gen.nz</a>&gt;</span> \
wrote:<br> <blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px \
#ccc solid;padding-left:1ex;"><div class="im">On Wednesday 03 August 2011 02:20:32 \
you wrote:<br> &gt; Hi,<br>
&gt;<br>
&gt; I saw those code:<br>
&gt; if (!dev-&gt;is_checkpointed) {<br>
&gt; urgency = yaffs_bg_gc_urgency(dev);<br>
&gt; gc_result = yaffs_bg_gc(dev, urgency);<br>
&gt; if (urgency &gt; 1)<br>
&gt; next_gc = now + HZ / 20 + 1;<br>
&gt; else if (urgency &gt; 0)<br>
&gt; next_gc = now + HZ / 10 + 1;<br>
&gt; else<br>
&gt; next_gc = now + HZ * 2;<br>
&gt; }<br>
&gt;<br>
&gt; Does it means yaffs will perform gc at least HZ*2? I mean nomorlly the HZ<br>
&gt; is around 1sec, does the gc frequence too often? Thank you.<br>
<br>
</div>It will only do the gc checking this often.<br>
<br>
That does not necessarily mean actual gc will happen.<br>
<div class="im"><br>
&gt;<br>
&gt; &gt; From: <a href="mailto:manningc2@actrix.gen.nz">manningc2@actrix.gen.nz</a><br>
 &gt; &gt; To: <a href="mailto:yaffs@lists.aleph1.co.uk">yaffs@lists.aleph1.co.uk</a><br>
 &gt; &gt; Date: Tue, 2 Aug 2011 09:48:56 +1200<br>
&gt; &gt; Subject: Re: [Yaffs] When yaffs perform GC?<br>
&gt; &gt;<br>
</div><div><div></div><div class="h5">&gt; &gt; On Tuesday 02 August 2011 04:10:11 \
HuangAlex wrote:<br> &gt; &gt; &gt; Hi guys,<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; I wonder when yaffs2 perform garbage collection, is every time \
power<br> &gt; &gt; &gt; on/off the device or just perform gc when the reseved blocks \
is less<br> &gt; &gt; &gt; than some specific value. Thank you.<br>
&gt; &gt;<br>
&gt; &gt; Have you read HowYaffsWorks?<br>
&gt; &gt;<br>
&gt; &gt; If you look at yaffs_guts.c and search for garbage or gc you will see \
the<br> &gt; &gt; conditions under which gc is done.<br>
&gt; &gt;<br>
&gt; &gt; -- CHarles<br>
&gt; &gt;<br>
&gt; &gt; _______________________________________________<br>
&gt; &gt; yaffs mailing list<br>
&gt; &gt; <a href="mailto:yaffs@lists.aleph1.co.uk">yaffs@lists.aleph1.co.uk</a><br>
&gt; &gt; <a href="http://lists.aleph1.co.uk/cgi-bin/mailman/listinfo/yaffs" \
target="_blank">http://lists.aleph1.co.uk/cgi-bin/mailman/listinfo/yaffs</a><br> <br>
<br>
<br>
_______________________________________________<br>
yaffs mailing list<br>
<a href="mailto:yaffs@lists.aleph1.co.uk">yaffs@lists.aleph1.co.uk</a><br>
<a href="http://lists.aleph1.co.uk/cgi-bin/mailman/listinfo/yaffs" \
target="_blank">http://lists.aleph1.co.uk/cgi-bin/mailman/listinfo/yaffs</a><br> \
</div></div></blockquote></div><br></div>



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic