ts-7000
[Top] [All Lists]

[ts-7000] Re: SD Card write delays

To:
Subject: [ts-7000] Re: SD Card write delays
From: "charliem_1216" <>
Date: Wed, 08 Aug 2007 19:57:47 -0000
Hi Frank --

--- In  "Frank Pagliughi" <> 
wrote:
>
> The root file system is on the internal flash. The SD Card is
> initially blank (with one or two ext2 partitions), and just 
receives
> the data.
> 
> We're alpha testing so the main app is dumping out a lot of status 
and
> log information, in addition to the actual data. 

If you temporarily stop streaming the status & log info, do you 
still get hangs from writing the individual 50k data files?

> 
> The status and log info is streaming out to a text file that is
> continuously open. Probably something like 20kB / sec worth of 
info.

You might want to try piping the streaming data into a buffering 
utility.  Without it, I think you are at the mercy of the kernel 
writing out it's buffers when (the kernel thinks) needed.  There are 
some ways to modify that kernel behaviour you could look into, but 
userland buffering might be easier.  

For example "Virtual Ring Buffer" at http://vrb.slashusr.org/.  It's 
mostly a ring buffer library, but has a demo utility "vbuf" that 
might work for you.  I'm sure there are others available.

> 
> The data is in individual files, around 50kB each, written once 
per
> sec (file open, write, close).
> 
> - Frank
> 
> --- In  <leaton10@> wrote:
> >
> > Do you have the root file system on the same card?
> > What else is on the card?
> > You must be writing a lot of data, is this a log or something 
you're
> writing?
> > 
> > From: "Frank Pagliughi" <fpagliughi@>
> > Date: 2007/08/08 Wed AM 09:46:39 EST
> > To: 
> > Subject: [ts-7000] Re: SD Card write delays
> > 
> > Wow, thanks, I never realized there were so many different 
speeds for
> > Flash memory. Went down to the camera store and bought a couple
> > different brands of fast SD Cards. 
> > 
> > It kind of made the problem worse!
> > 
> > Now the hangups happen less often, but when they do, they are
> > significantly longer - like 30 sec!

I bet you rebooted here, so the kernel had more buffers available 
(less memory pressure?).  Hence longer writes.

> > 
> > I can deal with a relatively high thread latency, but I can't 
believe
> > a driver would lock out the whole system for that long.

Seems to me too that the writes shouldn't block for so long, but it 
would be hard to investigate further since the sd driver is binary 
only.

Regards, ........ Charlie

> > 
> > Frank
> > 
> > 
> > --- In  <leaton10@> wrote:
> > >
> > > I've seen the same thing on the TS7250, but when writing to 
the on
> > board flash.
> > > It's probably the same thing. I imagine interrupts are 
disabled by
> > the kernel when writing to the flash.
> > > The SD is probably smarter though. It's probably blocking 
access
> > till it's done.
> > > Maybe there is an ioctl call to detect busy you could use
> > > You could get a faster SD card. 
> > > Larry
> > > 
> > > From: "Frank Pagliughi" <fpagliughi@>
> > > Date: 2007/08/07 Tue PM 01:44:02 EST
> > > To: 
> > > Subject: [ts-7000] SD Card write delays
> > > 
> > > Hey All,
> > > 
> > > I'm using a TS-7260 for a data-logger type of application, 
using a
> > > slightly modified ts11 kernel, the on-board flash for the root 
file
> > > system, with an SD Card mounted.
> > > 
> > > The application writes its data to the SD Card, but the writes
> > > occasionally lock up the whole system for something like 8-10 
seconds.
> > > I'm guessing when a block is being erased/written. Seems that
> > > everything running at user level just stops for that time.
> > > 
> > > Is anyone (everyone) else seeing this? Is there a workaround?
> > > 
> > > Any help would be apreciated.
> > > 
> > > Frank
> > >
> >
>



 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/ts-7000/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/ts-7000/join
    (Yahoo! ID required)

<*> To change settings via email:
     
    

<*> To unsubscribe from this group, send an email to:
    

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 

<Prev in Thread] Current Thread [Next in Thread>
Admin

Disclaimer: Neither Andrew Taylor nor the University of NSW School of Computer and Engineering take any responsibility for the contents of this archive. It is purely a compilation of material sent by many people to the birding-aus mailing list. It has not been checked for accuracy nor its content verified in any way. If you wish to get material removed from the archive or have other queries about the archive e-mail Andrew Taylor at this address: andrewt@cse.unsw.EDU.AU