[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] trunk r115201: Really initialize `write_region_inhibit_fsy
From: |
Romain Francoise |
Subject: |
[Emacs-diffs] trunk r115201: Really initialize `write_region_inhibit_fsync' when interactive. |
Date: |
Sat, 23 Nov 2013 11:33:51 +0000 |
User-agent: |
Bazaar (2.6b2) |
------------------------------------------------------------
revno: 115201
revision-id: address@hidden
parent: address@hidden
committer: Romain Francoise <address@hidden>
branch nick: trunk
timestamp: Sat 2013-11-23 12:32:05 +0100
message:
Really initialize `write_region_inhibit_fsync' when interactive.
* fileio.c (init_fileio): Move `write_region_inhibit_fsync'
initialization here ...
(syms_of_fileio): ... from here.
modified:
src/ChangeLog changelog-20091113204419-o5vbwnq5f7feedwu-1438
src/fileio.c fileio.c-20091113204419-o5vbwnq5f7feedwu-210
=== modified file 'src/ChangeLog'
--- a/src/ChangeLog 2013-11-23 03:23:20 +0000
+++ b/src/ChangeLog 2013-11-23 11:32:05 +0000
@@ -1,3 +1,9 @@
+2013-11-23 Romain Francoise <address@hidden>
+
+ * fileio.c (init_fileio): Move `write_region_inhibit_fsync'
+ initialization here ...
+ (syms_of_fileio): ... from here.
+
2013-11-23 Stefan Monnier <address@hidden>
* lread.c (init_lread): Fix int/Lisp_Object mixup.
=== modified file 'src/fileio.c'
--- a/src/fileio.c 2013-11-09 11:12:33 +0000
+++ b/src/fileio.c 2013-11-23 11:32:05 +0000
@@ -5773,6 +5773,24 @@
init_fileio (void)
{
valid_timestamp_file_system = 0;
+
+ /* fsync can be a significant performance hit. Often it doesn't
+ suffice to make the file-save operation survive a crash. For
+ batch scripts, which are typically part of larger shell commands
+ that don't fsync other files, its effect on performance can be
+ significant so its utility is particularly questionable.
+ Hence, for now by default fsync is used only when interactive.
+
+ For more on why fsync often fails to work on today's hardware, see:
+ Zheng M et al. Understanding the robustness of SSDs under power fault.
+ 11th USENIX Conf. on File and Storage Technologies, 2013 (FAST '13),
271-84
+ http://www.usenix.org/system/files/conference/fast13/fast13-final80.pdf
+
+ For more on why fsync does not suffice even if it works properly, see:
+ Roche X. Necessary step(s) to synchronize filename operations on disk.
+ Austin Group Defect 672, 2013-03-19
+ http://austingroupbugs.net/view.php?id=672 */
+ write_region_inhibit_fsync = noninteractive;
}
void
@@ -5985,28 +6003,12 @@
file is usually more useful if it contains the deleted text. */);
Vauto_save_include_big_deletions = Qnil;
- /* fsync can be a significant performance hit. Often it doesn't
- suffice to make the file-save operation survive a crash. For
- batch scripts, which are typically part of larger shell commands
- that don't fsync other files, its effect on performance can be
- significant so its utility is particularly questionable.
- Hence, for now by default fsync is used only when interactive.
-
- For more on why fsync often fails to work on today's hardware, see:
- Zheng M et al. Understanding the robustness of SSDs under power fault.
- 11th USENIX Conf. on File and Storage Technologies, 2013 (FAST '13),
271-84
- http://www.usenix.org/system/files/conference/fast13/fast13-final80.pdf
-
- For more on why fsync does not suffice even if it works properly, see:
- Roche X. Necessary step(s) to synchronize filename operations on disk.
- Austin Group Defect 672, 2013-03-19
- http://austingroupbugs.net/view.php?id=672 */
DEFVAR_BOOL ("write-region-inhibit-fsync", write_region_inhibit_fsync,
doc: /* Non-nil means don't call fsync in `write-region'.
This variable affects calls to `write-region' as well as save commands.
Setting this to nil may avoid data loss if the system loses power or
the operating system crashes. */);
- write_region_inhibit_fsync = noninteractive;
+ write_region_inhibit_fsync = 0; /* See also `init_fileio' above. */
DEFVAR_BOOL ("delete-by-moving-to-trash", delete_by_moving_to_trash,
doc: /* Specifies whether to use the system's trash can.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] trunk r115201: Really initialize `write_region_inhibit_fsync' when interactive.,
Romain Francoise <=