dsched_fq - Overhaul locking
authorAlex Hornung <ahornung@gmail.com>
Sat, 17 Apr 2010 09:51:27 +0000 (09:51 +0000)
committerAlex Hornung <ahornung@gmail.com>
Sat, 17 Apr 2010 10:56:14 +0000 (10:56 +0000)
commitaedbaf3ba5edf2f3c33496c3c542c8333943bca7
tree00ae19c3d03c16f921a212f11af3370003ff9ef0
parentd21705bcc1c27c7b99fbd88bf6cb34a58add4666
dsched_fq - Overhaul locking

* use lockmgr lock for FQP lock, as some strategy ops can sleep while
  acquiring another lock (CAM SIM lock, for example).

* reduce overall locking when it isn't really required, mainly during
  deallocation (losing last ref) of objects. The locking is only
  explicitly required to protect the internal TAILQs.

* NOTE: this is an _attempt_ to fix some unidentified deadlocks that have
  been reported occasionally. While it shouldn't happen, be aware that
  this might explode.

Reported-by: Antonio Huete, Jan Lentfer
sys/dsched/fq/dsched_fq.h
sys/dsched/fq/dsched_fq_core.c