Change fsync(2) optimization to per-file #1159
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The zfs_fsyncer_key TSD was added as a performance optimization
to reduce contention on the zl_lock from zil_commit(). This
issue manifested itself as very long (100+ms) system call
times for fsync(2) heavy workloads.
However, we'd like to eliminate the usage of TSD in ZoL while
keeping this optimization. There is no native Linux kernel
equivilant of TSD and the SPLs implementation is primitive.
It would simply be best to remove all the TSD consumers.
To achieve this the zfs_fsyncer_key TSD counter has been
reworked to be per-file instead of per-thread. This is not
expected to behave significantly differently than the original
implementation for real workloads.
This just leaves one small ZFS TSD consumer. If it can be
cleanly removed from the code we'll be able to shed the SPL
TSD implementation entirely.
Signed-off-by: Brian Behlendorf [email protected]
Issue openzfs/spl#174