本帖最後由 jinnib04792 於 2013-6-18 20:15 編輯
vsync (垂直同步)
http://www.coolaler.com/showthread.php/200417-%E8%AA%8D%E8%AD%98%E3%80%8E%E5%9E%82%E7%9B%B4%E5%90%8C%E6%AD%A5(vsync)%E3%80%8F%EF%BC%8C%E7%AF%80%E8%83%BD-%E5%8F%88-%E8%AD%B7%E7%9B%AE
fsync
http://linux.die.net/man/2/fsync
(我不知該如何解釋 ... 自己看一下吧)
Q: What kind of data may be lost when fsync is disabled? could you please give an example? may it cause a serious damage to the phone\\\'s system?
All data that any app thinks it has written to storage (as it explicitly instructed the OS to do so), but has not been written yet by the OS, may be lost in case of an unexpected system crash.
So as long as the system is running normally, all cached data is eventually written to the eMMC/SD, usually a few seconds after the write request, and everything works normally.
In case of a random reboot, or a \\\"hard\\\" system hang which requires you to power off and restart, or if you run out of battery, AND some app or background service wanted to write something to the file system just before that crash, such cached data is lost.
So what can happen? No hardware is damaged. In the absolutely worst case, the filesystem on your data partition is irrecoverably damaged and you have to do a factory reset, losing all your apps and your data, photos etc. (you do have a backup, don\\\'t you?). The chance for this worst case to happen is extremely low - in most cases the filesystem is automatically repaired at startup, and the incompletely written files are simply deleted. If this does not work for some reason, you can still manually try running fsck from the recovery.
If some system service just updated a database before the crash, it may be inconsistent after restarting. This can lead to malfunction of that service, e.g. FCs, missing info in your calendar, missing or garbled media files, etc.
So in summary - as long as the system is stable, disabling fsync only increases performance. By the way, app crashes (FC, ANR, ...) do not hurt here, only complete system crashes are bad.
(截錄至:http://forum.xda-developers.com/showthread.php?p=33381928) |