Re: About Reg Flushing
- From: "<ctacke/>" <ctacke[@]opennetcf[dot]com>
- Date: Wed, 30 Aug 2006 11:53:22 -0400
If some form of power backup isn't an option, #3 limits the failure window
the most and is simple.
-Chris
"Garratt" <Christian.H.Mikkelsen@xxxxxxxxx> wrote in message
news:OccjSeEzGHA.3704@xxxxxxxxxxxxxxxxxxxxxxx
Hmm i see your point and it s good. :)
Reg. persistence is a rather big problem. We did startout not using it at
all, but then we began
writting apps for our device. And all of the sudden we needed COM
components and needed
to be able to change for ex. the network setup on the device (We got
several devices which are all connected
to the same network). Thats why we started using the persistent registry
in the first place.
1
One alternative I can see, would be to stop using reg persistence and
write some kind of super
setup application which loads/installs all COM/network setup/ etc at
startup and forces them on to system reg etc.
2
Or maybe, since we got several HD drives, I could make a hard copy of the
reg and load that reg when the current reg gets corrupted?
Kindda like the famous "Last known good configuration" :-D.
But then i would still like to be able to disable the auto flush when i
detect a powerdown. Just minimize the threat further that the
reg starts to get written about that time.
3
Maybe one could stop using the auto flush and simply ask the app
developers to manually flush the reg when they have made COM installments
or just reg changes?
This might work since our onboard drive ONLY contains the reg., meaning
that there shouldnt be any r/w operations except, when forcebly loading
or saving the reg. from our apps.
Anyone got another idea or comments on any of these approaches?
Anything is greatly appreciated.
Best regards
Christian
"Dean Ramsier" <ramsiernospam@xxxxxxxxxx> wrote in message
news:OnPP%23xDzGHA.5048@xxxxxxxxxxxxxxxxxxxxxxx
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
.
- References:
- About Reg Flushing
- From: Garratt
- Re: About Reg Flushing
- From: voidcoder
- Re: About Reg Flushing
- From: Garratt
- Re: About Reg Flushing
- From: <ctacke/>
- Re: About Reg Flushing
- From: Dean Ramsier
- Re: About Reg Flushing
- From: Garratt
- About Reg Flushing
- Prev by Date: Re: Change the user interface language
- Next by Date: Future of PDAs
- Previous by thread: Re: About Reg Flushing
- Next by thread: USB Modem throughput
- Index(es):
Relevant Pages
|
Loading