]> git.proxmox.com Git - mirror_zfs.git/commit
Disable direct reclaim for z_wr_* threads
authorBrian Behlendorf <behlendorf1@llnl.gov>
Fri, 6 May 2011 22:12:15 +0000 (15:12 -0700)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Fri, 6 May 2011 22:26:26 +0000 (15:26 -0700)
commit21ade34764d11498abece590b965ce766f31de88
treec42ae469dd9f39192d951a851e421179170abcb4
parent3117dd0b9005eb76e483b9772c493883b82998bb
Disable direct reclaim for z_wr_* threads

The direct reclaim path in the z_wr_* threads must be disabled
to ensure forward progress is always maintained for txg processing.
This ensures that a txg will never get stuck waiting on itself
because it entered the following memory reclaim callpath.

  ->prune_icache()->dispose_list()->zpl_clear_inode()->zfs_inactive()
  ->dmu_tx_assign()->dmu_tx_wait()->tgx_wait_open()

It would be preferable to target this exact code path but the
kernel offers no way to do this without custom patches.  To avoid
this we are forced to disable all reclaim for these threads.  It
should not be necessary to do this for other other z_* threads
because they will not hold a txg open.

Closes #232
include/sys/zfs_context.h
module/zfs/spa.c