[Rpm-maint] [rpm-software-management/rpm] Add macro to force fsync() on close() (#187)

Jeff Johnson notifications at github.com
Fri Apr 14 13:16:44 UTC 2017


If you are arguing for "opt-in" rather than "opt-out" by default when a macro is not explicitly set, then change the "1" in this line:
`
_periodic_fsync =
                  rpmExpandNumeric("%{?_periodic_fsync}%{!?_periodic_fsync:1}");
`
Otherwise set %_periodic_fsync as you wish.

There wasn't any significant speedup using a 1Mb rather than a 32Kb buffer when implemented.

If you wish fdatasync to be called every ~1Mb, then add logic to call every other trip through the loop by, say, interpreting a small value of %_periodic_fsync as a count, and a large value as a desired fdatasync interval, and proceed accordingly.

If you are saying that there is no interest in ensuring either that RPM always syncs to disk, or that there aren't other systems where package management interferes with other running processes, you are incorrect.

The critical factor choosing to do fsync in RPM is going to be knowing the cost of using, and only measurements can tell the cost.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/187#issuecomment-294151888
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rpm.org/pipermail/rpm-maint/attachments/20170414/17242303/attachment.html>


More information about the Rpm-maint mailing list