linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
To: linux-kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: vfat unlink latency 54.6ms for 128MB files
Date: Tue, 11 Jan 2005 03:38:32 +0900	[thread overview]
Message-ID: <878y71xh7b.fsf@devron.myhome.or.jp> (raw)
In-Reply-To: <20050110012330.GA10846@m.safari.iki.fi> (Sami Farin's message of "Mon, 10 Jan 2005 03:23:30 +0200")

Sami Farin <7atbggg02@sneakemail.com> writes:

> Just wondering, when I remove a 128MB file on vfat partition
> (usb-storage, memcard reader), it causes 54.6ms latency
> in rtc_latencytest...  latency seems to increase linearly
> as the filesize grows.  I calculated 1s would be reached with
> 2344MB file but I didn't bother trying that yet.
> Are there any possible fixes for fat fs so
> that it doesn't disable interrupts for that long a time?

The fatfs itself doesn't disable any interrupt.  I guess the thing
depending on file size is the fat_free().

So, the following patch may change the behavior...
-- 
OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>

diff -up linux-2.6.10/fs/fat/cache.c.orig linux-2.6.10/fs/fat/cache.c
--- linux-2.6.10/fs/fat/cache.c.orig	2004-12-25 06:35:24.000000000 +0900
+++ linux-2.6.10/fs/fat/cache.c	2005-01-11 03:34:54.000000000 +0900
@@ -491,6 +491,8 @@ int fat_free(struct inode *inode, int sk
 		if (MSDOS_SB(sb)->free_clusters != -1)
 			MSDOS_SB(sb)->free_clusters++;
 		inode->i_blocks -= MSDOS_SB(sb)->cluster_size >> 9;
+
+		cond_resched();
 	} while (nr != FAT_ENT_EOF);
 	fat_clusters_flush(sb);
 	nr = 0;

  reply	other threads:[~2005-01-10 18:43 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-01-10  1:23 vfat unlink latency 54.6ms for 128MB files Sami Farin
2005-01-10 18:38 ` OGAWA Hirofumi [this message]
2005-01-10 19:39   ` Sami Farin
2005-01-10 22:36   ` Robert Hardy
2005-01-10 23:41     ` OGAWA Hirofumi

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=878y71xh7b.fsf@devron.myhome.or.jp \
    --to=hirofumi@mail.parknet.co.jp \
    --cc=linux-kernel@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).