summaryrefslogtreecommitdiffstats
path: root/module/zfs/zfs_log.c
diff options
context:
space:
mode:
authorBrian Behlendorf <[email protected]>2012-12-13 12:21:11 -0800
committerBrian Behlendorf <[email protected]>2012-12-19 09:08:01 -0800
commit31f2b5abdf95d8426d8bfd66ca7f62ec70215e3c (patch)
treee3bf9676ae43e1088462583570cbc5ce3cf24d14 /module/zfs/zfs_log.c
parent84daaddedbfc9cf4bd1490d8a6f4b2967051e308 (diff)
Remove TSD zfs_fsyncer_key
It's my understanding that the zfs_fsyncer_key TSD was added as a performance omtimization to reduce contention on the zl_lock from zil_commit(). This issue manifested itself as very long (100+ms) fsync() system call times for fsync() heavy workloads. However, under Linux I'm not seeing the same contention that was originally described. Therefore, I'm removing this code in order to ween ourselves off any dependence on TSD. If the original performance issue reappears on Linux we can revisit fixing it without resorting to TSD. 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]> Closes zfsonlinux/spl#174
Diffstat (limited to 'module/zfs/zfs_log.c')
-rw-r--r--module/zfs/zfs_log.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/module/zfs/zfs_log.c b/module/zfs/zfs_log.c
index cbd6f1cb4..4f144d553 100644
--- a/module/zfs/zfs_log.c
+++ b/module/zfs/zfs_log.c
@@ -457,7 +457,6 @@ zfs_log_write(zilog_t *zilog, dmu_tx_t *tx, int txtype,
{
itx_wr_state_t write_state;
boolean_t slogging;
- uintptr_t fsync_cnt;
ssize_t immediate_write_sz;
if (zil_replaying(zilog, tx) || zp->z_unlinked)
@@ -475,10 +474,6 @@ zfs_log_write(zilog_t *zilog, dmu_tx_t *tx, int txtype,
else
write_state = WR_NEED_COPY;
- if ((fsync_cnt = (uintptr_t)tsd_get(zfs_fsyncer_key)) != 0) {
- (void) tsd_set(zfs_fsyncer_key, (void *)(fsync_cnt - 1));
- }
-
while (resid) {
itx_t *itx;
lr_write_t *lr;
@@ -514,8 +509,7 @@ zfs_log_write(zilog_t *zilog, dmu_tx_t *tx, int txtype,
itx->itx_private = ZTOZSB(zp);
- if (!(ioflag & (FSYNC | FDSYNC)) && (zp->z_sync_cnt == 0) &&
- (fsync_cnt == 0))
+ if (!(ioflag & (FSYNC | FDSYNC)) && (zp->z_sync_cnt == 0))
itx->itx_sync = B_FALSE;
zil_itx_assign(zilog, itx, tx);