From manningc2@actrix.gen.nz Wed Feb 03 00:15:42 2010
Received: from smtp.firstline.co.nz ([203.167.210.162] helo=firstline.co.nz)
	by stoneboat.aleph1.co.uk with smtp (Exim 4.69)
	(envelope-from <manningc2@actrix.gen.nz>) id 1NcSu3-00081V-3G
	for yaffs@lists.aleph1.co.uk; Wed, 03 Feb 2010 00:15:42 +0000
Received: (qmail 25956 invoked by uid 453); 3 Feb 2010 00:15:16 -0000
X-Virus-Checked: Checked by ClamAV on firstline.co.nz
Received: from Unknown (HELO linux-dual-head.local) (10.14.210.25)
	by firstline.co.nz (qpsmtpd/0.40) with ESMTP;
	Wed, 03 Feb 2010 13:15:16 +1300
From: Charles Manning <manningc2@actrix.gen.nz>
To: yaffs@lists.aleph1.co.uk
Date: Wed, 3 Feb 2010 13:15:15 +1300
User-Agent: KMail/1.9.10
References: <F002782D89A542FBBB9005EFF1892825@johanxp>
In-Reply-To: <F002782D89A542FBBB9005EFF1892825@johanxp>
MIME-Version: 1.0
Content-Type: text/plain;
  charset="utf-8"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
Message-Id: <201002031315.15318.manningc2@actrix.gen.nz>
X-SA-Exim-Connect-IP: 203.167.210.162
X-SA-Exim-Mail-From: manningc2@actrix.gen.nz
X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on
	stoneboat.aleph1.co.uk
X-Spam-Level: 
X-Spam-Status: No, score=-1.9 required=4.5 tests=AWL,BAYES_00,SPF_NEUTRAL
	autolearn=no version=3.2.5
X-SA-Exim-Version: 4.2.1 (built Wed, 25 Jun 2008 17:14:11 +0000)
X-SA-Exim-Scanned: Yes (on stoneboat.aleph1.co.uk)
Subject: Re: [Yaffs] multithreading question
X-BeenThere: yaffs@lists.aleph1.co.uk
X-Mailman-Version: 2.1.11
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/options/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: Wed, 03 Feb 2010 00:15:42 -0000

On Tuesday 02 February 2010 00:29:17 Johan Kotlinski wrote:
> Hi!
> It appears that Yaffs2 multithreading protection is on a very high level
> (mutex wrapping entire fread/fwrite calls).

Are you talking about yaffs direct or the Linux yaffs? 
The linux yaffs will be locked on a page-by-page basis and I am going to 
change the way yaffs direct does the reading/writing too to only lock on a 
page-by-page basis.

The underlying NAND is locked on a apge by page basis too (that's a limitation 
of the hardware), so is this really a big concern?


>
> My worry is that if a low-priority task does a large fwrite call, it could
> block high-priority tasks for a long time. Is this an acknowledged problem?

It depends on the OS. Some, without priority inhere, won't have this problem.
> Are there comparable file systems that handle multithreading in a more
> granular way?





