K 10 svn:author V 3 mav K 8 svn:date V 27 2013-08-29T11:49:53.089854Z K 7 svn:log V 1000 Drop periph (device) locks for da and ada drivers while submitting commands for execution. That substantially reduces these locks hold time, removing any measurable congestion. While GEOM guaranties that disk won't be closed before all requests completed, dropping lock in this place opens hypothetical race in case if last request manage to complete before submission call return. If periph will be destroyed at that point, it may cause user-after-free panic. To cover that case introduce additional per-periph reference counter to make close handler wait for all submission threads to get out before dropping periph reference and return. This change removes last measurable lock congestion inside CAM core on my test setup. The only congestion left is inside SIM between request submit and completion threads, but avoiding that requires SIM modification and depending on specific hardware may be problematic or impossible. On my present test setup this increases maximum IOPS from 673K to 724K. END