]> granicus.if.org Git - zfs/commit
Illumos #4347 ZPL can use dmu_tx_assign(TXG_WAIT)
authorMatthew Ahrens <mahrens@delphix.com>
Fri, 22 Nov 2013 23:13:18 +0000 (15:13 -0800)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Fri, 6 Dec 2013 17:30:51 +0000 (09:30 -0800)
commit384f8a09f8423d951bb81d9ca945e588de14f95f
treeecc453b3d1561ac9952a418e5d4fc8db9002568f
parent729210564a5325e190fc4fba22bf17bacf957ace
Illumos #4347 ZPL can use dmu_tx_assign(TXG_WAIT)

Fix a lock contention issue by allowing threads not holding
ZPL locks to block when waiting to assign a transaction.

Porting Notes:

zfs_putpage() still uses TXG_NOWAIT, unlike the upstream version.  This
case may be a contention point just like zfs_write(), however it is not
safe to block here since it may be called during memory reclaim.

Reviewed by: George Wilson <george.wilson@delphix.com>
Reviewed by: Adam Leventhal <ahl@delphix.com>
Reviewed by: Dan McDonald <danmcd@nexenta.com>
Reviewed by: Boris Protopopov <boris.protopopov@nexenta.com>
Approved by: Dan McDonald <danmcd@nexenta.com>

References:
  https://www.illumos.org/issues/4347
  illumos/illumos-gate@e722410c49fe67cbf0f639cbcc288bd6cbcf7dd1

Ported-by: Ned Bass <bass6@llnl.gov>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
module/zfs/zfs_dir.c
module/zfs/zfs_vnops.c
module/zfs/zfs_znode.c