mfe.c - use of write cache and bm_flush_cache() is confusing
I am confused by the use of bm_flush_cache() in mfe.c.
In some places, bm_flush_cache() is done immediately after bm_send_event() (rpc_send_event()), completely defeating the write cache.
In other places there is a loop to bm_flush_cache() of all open buffers, not just the one we are writing into (i.e. bm_flush_cache() is unnecessarily called on the SYSMSG buffer).
Then there is a periodic call to bm_flush_cache() at around 1 Hz to flush the current equipment if it is not writing fast enough.
I think all the calls to bm_flush_cache() should be removed except for the 1Hz periodic flush.
But clearly I do not understand the intent of this logic...
K.O.
Comments (3)
-
-
reporter there is an additional problem - when connected remotely, in addition to flushing the event buffer cache, data in the event socket has to be flushed, this needed modifications to the mserver. i think the tmfe frontend handles everything it correctly now. as of merge https://bitbucket.org/tmidas/midas/commits/96028cf8c5cf145070c0f9d033e25a73c12ca28e
K.O.
-
reporter - changed status to resolved
works correctly in the tmfe frontend. K.O.
- Log in to comment
I don't know exactly which locations you refer, but the original design idea was the following:
Stefan