FAT thrashing...
- From: "Jerry" <mapblast@xxxxxxxxx>
- Date: 19 Aug 2005 11:42:25 -0700
I'm working on optimizing our BSP (Xscale) and app and have run into an
odd problem that has me stumped.
The app is writing 128KB chunks of audio to disk (CF) via a customized
driver we wrote. It's writing at a rate of about 1.1MB/sec. A logic
analyzer instrumented to the read/write sections of the driver shows
that the file system does a read about once a second.
After running for a while, 5 to 10 minutes (depends on size/speed of
disk), it suddenly starts doing a bunch of reads (~30) before every
128KB block. Putting a breakpoint in and viewing the stack I see:
(etc...on down to our driver)
FSDMGR!PartitionIoControl() line 28 + 60 bytes
FSDMGR!FSDMGR_DiskIoControl() line 568 + 68 bytes
FATFSD!ReadWriteDisk2() line 517 + 60 bytes
FATFSD!ReadWriteDisk() line 258 + 44 bytes
FATFSD!ReadVolume() line 88 + 104 bytes
FATFSD!FindBuffer() line 1036 + 32 bytes
FATFSD!ReadStreamBuffer() line 1236 + 96 bytes
FATFSD!GetFAT() line 86 + 28 bytes
FATFSD!Unpack16() line 327 + 28 bytes
FATFSD!UnpackRun() line 540 + 32 bytes
FATFSD!WriteStreamData() line 1019 + 8 bytes
FATFSD!FATFSWriteFile() line 492 + 40 bytes
FATFSD!FAT_WriteFile() line 788 + 44 bytes
FSDMGR!FSDMGR_WriteFile() line 933 + 56 bytes
COREDLL!xxx_WriteFile() line 80 + 36 bytes
OUR_APP!hdRiff::Write() line 143 + 48 bytes
We are setup to use FATFSD with cache disabled. Furthermore the files
are created with the following flags:
FILE_FLAG_WRITE_THROUGH |
FILE_FLAG_SEQUENTIAL_SCAN |
FILE_FLAG_NO_BUFFERING
Everything works perfect up to the 5 or 10 minute mark with the FAT
starts thrashing. If I close the file and immediately open a new one
it will run fine for another 5 or 10 minutes.
The disks aren't fragmented and this is the only disk activity going
on.
Any ideas?
Thanks!
-Jerry
.
- Follow-Ups:
- Re: FAT thrashing...
- From: Mr Fixit
- Re: FAT thrashing...
- From: Jerry
- Re: FAT thrashing...
- Prev by Date: Re: Lost in confusion with IP Access...
- Next by Date: Re: Lost in confusion with IP Access...
- Previous by thread: Change the default serial port settings in the image
- Next by thread: Re: FAT thrashing...
- Index(es):
Relevant Pages
|