The following default values have changed for system tunables.
Applications that depend on the 9.x releases default values may
need to adjust these parameters when building the 10.x kernel.
New Kernel Tunable (o_sync_is_o_dsync) |
 |
For 10.10:
The o_sync_is_o_dsync
kernel tunable parameter is new for 10.10, but is available as a
patch for 10.0 and 10.01.
o_sync_is_o_dsync
provides a way for you to get 9.x synchronous IO semantics and performance
on 10.x releases with 9.x binaries that use the O_SYNC
option to open(2)
or fcntl(2).
In 9.x, O_SYNC,
like O_DSYNC
in 10.0, caused synchronous writes for file data, but not for file
attributes that are not needed to retrieve the data, such as access
and modification times. This gave improved performance, but was
a violation of the POSIX standard. In 10.0, O_SYNC
performed synchronous writes for data and all file attributes, while
O_DSYNC is equivalent
to 9.x O_SYNC.
If you do not want to rewrite code or recompile your 9.x O_SYNC
applications, use the o_sync_is_o_dsync
kernel tunable. When o_sync_is_o_dsync
is set to a positive value, all open(2)
and fcntl(2)
calls that specify O_SYNC
are translated into O_DSYNC
inside the kernel, making the 10.x kernel equivalent to the 9.x
kernel in synchronous file IO behavior. See the open(2)
manpage for more information about O_SYNC
and O_DSYNC.
Patches for o_sync_is_o_dsync
is available for 10.0 and 10.01. For 10.10, SAM can be used to set o_sync_is_o_dsync;
for 10.0 and 10.01, o_sync_is_o_dsync
will have to be set using adb.
This feature is off by default, so will have no effect on
users who do not turn it on. When this option is turned on, all
applications and processes running on the system that have files
opend or fcntld
with O_SYNC will
have the O_SYNC
changed to O_DSYNC.
In the event of a kernel crash, changes to file attributes that
are not needed to access file data may be lost, but file data will
not be lost.
Use of this option preserves backward compatibility for performance
purposes with 9.0X releases. If you do not use this option, applications
that use O_SYNC
in 9.0X and that do not modify their sources, might see a negative
performance impact. But, functionally the applications will run
the same.
Users who want to have only those file attributes necessary
to retrieve user data written out synchronously and who do not want
to use the o_sync_is_o_dsync
tunable should recode their applications to use the O_DSYNC
flag instead of the O_SYNC flag.
See the open(2)
and fcntl(2)
manpages for details.