Heh, I was about to suggest exactly the same thing. Unless the delay
is gonna be multiple times longer than avg flush time, I don't think
the difference between the above scheme and the one w/ preemptive
delay would be anything significant especially now that the cost of
flush is much lower. Also, as Neil pointed out in another message,
the above scheme will result in lower latency for flushes issued while
no flush is in progress.
IMO, this kind of optimization is gonna make noticeable difference
only when there are a lot of simulatenous fsyncs, in which case the
above would behave in mostly identical way with the more elaborate
timer based one anyway.
Thanks.
--
tejun
--