You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+9-6Lines changed: 9 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,9 +1,9 @@
1
-
# Script_Optfs #
2
-
### What is Script_Optfs? ###
3
-
Script_Optfs is a conversion tool, capable of converting libraries that use `fsync` pessimistically to be compatible with the Optimistic File System ([OptFS](https://github.com/utsaslab/optfs)).
1
+
# AutoOsync #
2
+
### What is AutoOsync? ###
3
+
AutoOsync is a conversion tool, capable of converting libraries that use `fsync` pessimistically to be compatible with the Optimistic File System ([OptFS](https://github.com/utsaslab/optfs)).
4
4
OptFS is a linux-ext4 variant that implements [Optimistic Crash Consistency](http://research.cs.wisc.edu/adsl/Publications/optfs-sosp13.pdf) which essentially makes the same level of guarantee as Pessimistic Crash Consistency (`fsync()` after every write) with sometimes the same speed as Probabilistic Crash Consistency (never calling `fsync()`).
5
5
6
-
This means that you can easily speed up the writes in your program by switching to OptFS and running Script_Optfs on the libraries that are in charge of persistence.
6
+
This means that you can easily speed up the writes in your program by switching to OptFS and running AutoOsync on the libraries that are in charge of persistence.
7
7
8
8
### Getting Setup ###
9
9
#### Script Dependencies ####
@@ -12,7 +12,7 @@ The only dependency for this script besides `Python2.7` is `LLVM` with clang bin
12
12
1. Run the following script after fixing the path, if necessary, to [Install Ninja](https://github.com/JDevlieghere/dotfiles/blob/master/installers/ninja.sh)
13
13
1. Then, run this script to actually get the `LLVM` source code. [LLVM](https://github.com/JDevlieghere/dotfiles/blob/master/installers/llvm.sh)
14
14
15
-
#### Running the Script_Optfs ####
15
+
#### Running the AutoOsync ####
16
16
1. Go to the script source, `script.py`, and then modify the `set_library_path` variable to your path to LLVM's `/build/lib`.
17
17
Once that is done, you might need to set an environmental variable, if the compiler throws you an error, otherwise, you are done and the script can be run.
18
18
1. To run the script, you just type `python script.py /path/to/library` and the script should run and modify everything in a new directory `<library_name>_`.
@@ -61,7 +61,7 @@ void dsync_foo() {
61
61
62
62
```
63
63
3. Special case of `fsync`: Since `fsync` is an `fsync_wrapper` too, it must get its own version of osync definition and dsync definition. And it does! The osync definition of `fsync` is called `osync` and it's a system call that guarantees order and eventual durability. The dsync definition of `fsync` is called `dsync` and it's a system call that guaratess immediate durability (blocks). For more details, check the Optimistic Crash Cosnsistency paper linked above.
64
-
### Safety of the Script_Optfs ###
64
+
### Safety of the AutoOsync ###
65
65
The script is safe in most cases, but there certainly are cases we don't account for.
66
66
This script can deal with scope, so you can have functions with the same name in multiple files, as long as more than one of those functions doesn't have external linkage, our script will take care it. We went through great lengths to ensure that.
67
67
However, cases where a switch statement is used, like the following:
@@ -101,15 +101,18 @@ switch (expression) {
101
101
case 1:
102
102
osync(fd1);
103
103
break; /* this function is a dsync definition, yet it doesn't ever call dsync if case 1 is called */
104
+
104
105
case 2:
105
106
osync(fd2);
106
107
break; /* same in this case, dsync definitions should call dsync before they return */
108
+
107
109
default:
108
110
osync(fd1);
109
111
dsync(fd2); /* only in this case will dsync actually be invoked before the function returns */
110
112
}
111
113
}
112
114
```
115
+
So in this case, the dsync definition doesn't actually invariably call dsync, although that is the expected behavior.
113
116
### Authors ###
114
117
Tom Gong (tom.gong@utexas.edu) and Subrat Mainali (mainali.subrat@utexas.edu)
0 commit comments