Re: About Reg Flushing
- From: "Dean Ramsier" <ramsiernospam@xxxxxxxxxx>
- Date: Wed, 30 Aug 2006 10:01:42 -0400
I agree. If it's that critical that you don't lose your registry, I'd think
hard about using any type of reg persistence at all.
--
Dean Ramsier - eMVP
BSQUARE Corporation
"<ctacke/>" <ctacke[@]opennetcf[dot]com> wrote in message
news:uId3OIDzGHA.4176@xxxxxxxxxxxxxxxxxxxxxxx
You really need a hardware solution for this type of situation. Either
supercaps or a battery that provides enough power to eitehr cleanly shut
down or go into sleep mode. I can say from experience that TFAT and the
MSFLASH driver is not solid enough to survive your scenario. You can
easily get it to fail by writing a test app that writes to the file store
and then resets the board during the write operation. If it survives more
than 10 resets I'd be surprised.
-Chris
"Garratt" <Christian.H.Mikkelsen@xxxxxxxxx> wrote in message
news:ONKUsaCzGHA.5048@xxxxxxxxxxxxxxxxxxxxxxx
Sure :)
Our system is subject for frequent power failures due harzardous
eviroment soo it absolut
imperative that either the reg. db or fat table has not got any chance of
getting corrupted.
So we dont have the luxurious option of doing a gracefull power down.
Our registry is saved on an onboard Flash disc, so I see your point with
the time factor.
However our reg. is not very big and since ive set the auto flush to
rather large values
and periods, there should be a good chance that I could disable the auto
flush in the 16ms window.
This is to ensure that absolutly no writes are attempted after ive
detected the power down and in the following
16ms.
So if this is enough information then back to the original question is
there a way to disable the agg. flush runtime?
Best regards
Christian
"voidcoder" <voidcoder@xxxxxxxxx> wrote in message
news:op.te29aodr52hq2f@xxxxxxxxxxx
Could you please explain, why do you need to disable
the aggressive flushing during the sadden power off?
TFAT should be safe enough to survive the power off
operations.
I would understand the design where you don't use
the aggressive flushing at all, but explicitly flush
the registry changes when the GPIO pin reports the
power down condition. Or better, shut down the OS
so that everything is closed properly and the
registry is flushed automatically during the
normal OS power down sequence.
Anyway, having only 16ms time may not help you
here. Depending on the storage type (what is it?
flash memory? anything else?) and system load
some operations can take much longer, eg. flash
block erase operation on some flashes may be up
to ~1 second! So if you get the power down event
during the pending write or erase operation, it is
simply impossible to break it in 16ms and thus
to prevent or force flushing operation.
On Wed, 30 Aug 2006 10:19:49 +0200, Garratt
<Christian.H.Mikkelsen@xxxxxxxxx> wrote:
Hey
Im currently using the PRJ_ENABLE_REGFLUSH_THREAD to enable auto flush
of my
reg to persistent disc (TFAT).
Now Ive also got a GPIO on which i can read the power state of my
PXA255. I
want to write a small driver
that monitors this GPIO, so that when power is lost ive got about
16ms(hold
up time) in which i can disable the reg flushing.
This is to ensure no corruption of the reg. on sudden poweroffs.
Is is possible to deactivate the autoflushing runtime? If so then how?
I thought about identifiyng the process and then kill it but since i
dont
know how it actually works together with the reg settings for the
PRJ_ENABLE_REGFLUSH_THREAD i not sure that this is the correct
approach. Any
ideas?
Best regards
Christian
.
- Follow-Ups:
- Re: About Reg Flushing
- From: Garratt
- Re: About Reg Flushing
- References:
- About Reg Flushing
- From: Garratt
- Re: About Reg Flushing
- From: voidcoder
- Re: About Reg Flushing
- From: Garratt
- Re: About Reg Flushing
- From: <ctacke/>
- About Reg Flushing
- Prev by Date: Re: About Reg Flushing
- Next by Date: USB Modem throughput
- Previous by thread: Re: About Reg Flushing
- Next by thread: Re: About Reg Flushing
- Index(es):
Relevant Pages
|
Loading