From Asheef@mistralsolutions.com Mon Mar 03 07:21:39 2008
Received: from [220.227.112.130] (helo=Mistralsoftware.com)
	by stoneboat.aleph1.co.uk with esmtp (Exim 4.63)
	(envelope-from <Asheef@mistralsolutions.com>) id 1JW4zK-0004AG-Ha
	for yaffs@lists.aleph1.co.uk; Mon, 03 Mar 2008 07:21:39 +0000
Received: from WorldClient by mistralsoftware.com (MDaemon PRO v9.6.4)
	with ESMTP id 57-md50000007649.msg
	for <yaffs@lists.aleph1.co.uk>; Mon, 03 Mar 2008 12:53:41 +0530
X-Authenticated-Sender: Asheef@mistralsolutions.com
X-MDRemoteIP: 127.0.0.1
X-Return-Path: Asheef@mistralsolutions.com
X-Envelope-From: Asheef@mistralsolutions.com
X-MDaemon-Deliver-To: yaffs@lists.aleph1.co.uk
Received: from [192.168.13.217] by mistralsolutions.com via WorldClient with
	HTTP; Mon, 03 Mar 2008 12:53:38 +0530
Date: Mon, 03 Mar 2008 12:53:38 +0530
From: "Asheefikbal" <Asheef@mistralsolutions.com>
To: yaffs@lists.aleph1.co.uk <yaffs@lists.aleph1.co.uk>
MIME-Version: 1.0
Content-Type: multipart/alternative; boundary="_0303-1253-38-PART-BREAK"
Message-ID: <WorldClient-F200803031253.AA53380041@mistralsolutions.com>
X-Mailer: WorldClient 9.6.4
X-Priority: 1 (Highest)
X-MDAV-Processed: Mistralsoftware.com, Mon, 03 Mar 2008 12:53:41 +0530
X-Host-Lookup-Failed: Reverse DNS lookup failed for 220.227.112.130 (failed)
X-SA-Exim-Connect-IP: 220.227.112.130
X-SA-Exim-Mail-From: Asheef@mistralsolutions.com
X-Spam-Checker-Version: SpamAssassin 3.2.3 (2007-08-08) on
	stoneboat.aleph1.co.uk
X-Spam-Level: 
X-Spam-Status: No, score=-2.5 required=5.0 tests=BAYES_00,HTML_MESSAGE,
	RDNS_NONE autolearn=no version=3.2.3
X-SA-Exim-Version: 4.2.1 (built Tue, 09 Jan 2007 17:23:22 +0000)
X-SA-Exim-Scanned: Yes (on stoneboat.aleph1.co.uk)
Subject: [Yaffs] GC Usage and Optimization to improve the write performance
X-BeenThere: yaffs@lists.aleph1.co.uk
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: Discussion of YAFFS NAND flash filesystem <yaffs.lists.aleph1.co.uk>
List-Unsubscribe: <http://lists.aleph1.co.uk/cgi-bin/mailman/listinfo/yaffs>, 
	<mailto:yaffs-request@lists.aleph1.co.uk?subject=unsubscribe>
List-Archive: <http://lists.aleph1.co.uk/lurker/list/yaffs.html>
List-Post: <mailto:yaffs@lists.aleph1.co.uk>
List-Help: <mailto:yaffs-request@lists.aleph1.co.uk?subject=help>
List-Subscribe: <http://lists.aleph1.co.uk/cgi-bin/mailman/listinfo/yaffs>,
	<mailto:yaffs-request@lists.aleph1.co.uk?subject=subscribe>
X-List-Received-Date: Mon, 03 Mar 2008 07:21:40 -0000

--_0303-1253-38-PART-BREAK
Content-Type: text/plain; charset="us-ascii"


 
Hi All,
 
I'm run into the problem with GC usage in yaffs2, which is causing the lower 
write performance.
 
When the disk(NAND) is in fully erased state(i.e, 0% usage), i will get the 
higher write performance,
but as the usage increases, performance is gradually decreases. I am just 
trying to copy some files, 
delete and then copy again.
 
I also did an experiment by commenting GC during file write, which leads to 
consistently higher 
performance. From this its clear that GC is the one which is causing the 
problem.
 
I am thinking of following approaches to address this issue. Please correct 
me if  i'm wrong
 
1. I tried the GC during SoftDeleteWorker context. 
    i.e, in the function "yaffs_SoftDeleteChunk" after incrementing the 
"softdeletion" parameter
    of the block information, call yaffs_CheckGarbageCollection
 
    I have tried this method to minimise the GC load during file write (i.e, 
the load on 
    yaffs_WriteChunkDataToObject)
 
2. While observed during Garbage Collection that, even if the pagesInUse of 
a block becomes ZERO
    (i.e, bi->pagesInUse - bi->softDeletions in " 
yaffs_FindBlockForGarbageCollection" function,), in 
    function   yaffs_GarbageCollectBlock, we are reading all the chunks and 
decrement the nDataChunks
    counter of the correcponding object. 
 
    I am just wondering is it possible to remove this overhead (reading all 
the chunks while the pagesInUse
    of that block is zero) by updating the nDataChunks counter while 
softDelete of the corresponding object,
   and erase the block directly while the pagesInUse of that block are zero.
 
Also i am wondering, will the above two approaches cause any abnormal 
behaviour in any other context.
 
Thanks,
Asif
 


-------------------------------------------------------DISCLAIMER------------------------------------------------------
The information transmitted herewith is confidential and proprietary information intended only for use by the individual or entity to which it is addressed. If the reader of this message is not the intended recipient, you are hereby notified that any review, retransmission, dissemination, distribution, copying or other use of, or taking of any action in reliance upon this information is strictly prohibited. If you have received this communication in error, please contact the sender and delete the material from your computer.
--------------------------------------------------------------------------------------------------------------------------------

Please do not print this email unless it is absolutely necessary. Spread environmental awareness.

--_0303-1253-38-PART-BREAK
Content-Type: text/html; charset="us-ascii"

<HTML>
<FONT style="FONT-SIZE: 10pt; FONT-FAMILY: ">
<DIV><BR>&nbsp;</DIV>
<DIV><FONT color=#003366>Hi All,</FONT></DIV>
<DIV><FONT color=#003366>&nbsp;</FONT></DIV>
<DIV><FONT color=#003366>I'm&nbsp;run into the problem with GC usage in 
yaffs2, which is causing the lower write performance.</FONT></DIV>
<DIV><FONT color=#003366></FONT>&nbsp;</DIV>
<DIV><FONT color=#003366>When the disk(NAND) is in fully erased state(i.e, 
0% usage), i will get the higher write performance,</FONT></DIV>
<DIV><FONT color=#003366>but as the usage increases, performance is 
gradually decreases. I am just trying to copy some files, </FONT></DIV>
<DIV><FONT color=#003366>delete and then copy again.</FONT></DIV>
<DIV><FONT color=#003366></FONT>&nbsp;</DIV>
<DIV><FONT color=#003366>I also did an experiment by commenting GC during 
file write, which leads to consistently higher </FONT></DIV>
<DIV><FONT color=#003366>performance. From this its clear that GC is the one 
which is causing the problem.</FONT></DIV>
<DIV><FONT color=#003366>&nbsp;</FONT></DIV>
<DIV><FONT color=#003366>I am thinking of following approaches&nbsp;to 
address this issue. Please correct me if&nbsp; i'm wrong</FONT></DIV>
<DIV><FONT color=#003366>&nbsp;</FONT></DIV>
<DIV><FONT color=#003366><STRONG>1. </STRONG>I tried the GC during 
SoftDeleteWorker context. </FONT></DIV>
<DIV><FONT color=#003366>&nbsp;&nbsp;&nbsp; i.e, in the function 
"yaffs_SoftDeleteChunk" after incrementing the "softdeletion" 
parameter</FONT></DIV>
<DIV><FONT color=#003366>&nbsp;&nbsp;&nbsp; of the block information, call 
yaffs_CheckGarbageCollection</FONT></DIV>
<DIV><FONT color=#003366>&nbsp;</FONT></DIV>
<DIV><FONT color=#003366>&nbsp;&nbsp;&nbsp; I have tried this method to 
minimise the GC load during file write (i.e, the load on </FONT></DIV>
<DIV><FONT color=#003366>&nbsp;&nbsp;&nbsp; 
yaffs_WriteChunkDataToObject)</FONT></DIV>
<DIV><FONT color=#003366>&nbsp;</FONT></DIV>
<DIV><FONT color=#003366><STRONG>2.&nbsp;</STRONG>While observed during 
Garbage Collection that, even if the <STRONG>pagesInUse</STRONG> of 
a&nbsp;block becomes <STRONG>ZERO</STRONG></FONT></DIV>
<DIV><FONT color=#003366>&nbsp;&nbsp;&nbsp; (i.e, <STRONG>bi-&gt;pagesInUse 
- bi-&gt;softDeletions</STRONG>&nbsp;in "<STRONG> 
yaffs_FindBlockForGarbageCollection</STRONG>" function,), in </FONT></DIV>
<DIV><FONT color=#003366>&nbsp;&nbsp;&nbsp; function &nbsp;<STRONG> 
yaffs_GarbageCollectBlock</STRONG>, we are reading all the chunks and 
decrement the <STRONG>nDataChunks</STRONG></FONT></DIV>
<DIV><FONT color=#003366>&nbsp;&nbsp;&nbsp; counter of the correcponding 
object.&nbsp;</FONT></DIV>
<DIV><FONT color=#003366></FONT>&nbsp;</DIV>
<DIV><FONT color=#003366>&nbsp;&nbsp;&nbsp; I am just wondering is it 
possible to remove this overhead&nbsp;(reading all the chunks while the 
pagesInUse</FONT></DIV>
<DIV><FONT color=#003366>&nbsp;&nbsp;&nbsp; of that block is zero) by 
updating the nDataChunks counter while softDelete of the corresponding 
object,</FONT></DIV>
<DIV><FONT color=#003366>&nbsp;&nbsp; and erase the block directly while the 
pagesInUse of that block are zero.</FONT></DIV>
<DIV><FONT color=#003366></FONT>&nbsp;</DIV>
<DIV><FONT color=#003366>Also i am wondering, will the above two approaches 
cause any abnormal behaviour in any other context.</FONT></DIV>
<DIV><FONT color=#003366></FONT>&nbsp;</DIV>
<DIV><FONT color=#003366>Thanks,</FONT></DIV>
<DIV><FONT color=#003366>Asif</FONT></DIV>
<DIV>&nbsp;</DIV></FONT><BR>
<br>-------------------------------------------------------DISCLAIMER------------------------------------------------------<br>
The information transmitted herewith is confidential and proprietary information intended only for use by the individual or entity to which it is addressed. If the reader of this message is not the intended recipient, you are hereby notified that any review, retransmission, dissemination, distribution, copying or other use of, or taking of any action in reliance upon this information is strictly prohibited. If you have received this communication in error, please contact the sender and delete the material from your computer.<br>
--------------------------------------------------------------------------------------------------------------------------------<br>
<br>
Please do not print this email unless it is absolutely necessary. Spread environmental awareness.<br>
</HTML>

--_0303-1253-38-PART-BREAK--



