This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Wince LazyFlush resume problem

Dear Experts,
I am using OMAP35X and WinCE 6.14.
I am trying LazyFlush feature by set PRJ_ENABLE_REGFLUSH_THREAD=1, PRJ_ENABLE_FSREGHIVE=1, "RegistryFlags"=dword:0).
And add [HKEY_LOCAL_MACHINE\System\ObjectStore\RegFlush] registry key:
[HKEY_LOCAL_MACHINE\System\ObjectStore\RegFlush]
;"ActivityName"=""
"SpawnThread"=dword:1
"FlushPriority256"=dword:FF
"ActivityThreshold"=dword:100
"FlushPeriod"=dword:1388
It works, but there is a issue:
When system into suspend and resume, sometimes I can not save registry anymore.
If I can not save registry anymore, it will keep this situation unless power off/on system.
I wonder if resume happend, LazyFlush thread might occurs early than read/write storage device, 
thus filesystem will break down somewhere.
Am I right ?
Aggressive Flush did not have this situation.("RegistryFlags"=dword:1)
Anyone can tell me how to solve this issue ~ ?
Thx ~
  • Which filesystem/storage device are you using for hive registry? It is possible that the storage device is un-mounted before the lazy flush thread gets a chance to store the registry. Can you check if you see any crashes (enable KITL or OAL Retail Messages) during suspend/resume for the cases when registry save stops working. One solution could be calling RegFlushKey() explicitly during suspend/resume before your storage device is un-mounted.

    Also, have you tried posting this on msdn forum?

     

  • Dear Madhvi,

    1) Yes, I am using hive registry.

    2) It is possible that the storage device is un-mounted before the lazy flush thread gets a chance to store the registry. ==>

    Do you mean when platform resumes, the lazy flush thread will start early than storage device re-mount ?

    During resume, will Multi-thread start early than storage device power on ?

    3) One solution could be calling RegFlushKey() explicitly during suspend/resume before your storage device is un-mounted.==>

    Do you mean that I should RegFlushKey() before SetSystemPowerState into suspend ? I try this, but still the same ~

    Can I delay the lazy flush thread when I resume the platform ??  How to achieve this ?? I can't find any implementation about lazy flush  !!