Fix a livelock in the objcache blocking code. PCATCH was being improperly
authorMatthew Dillon <dillon@dragonflybsd.org>
Fri, 14 Apr 2006 01:06:21 +0000 (01:06 +0000)
committerMatthew Dillon <dillon@dragonflybsd.org>
Fri, 14 Apr 2006 01:06:21 +0000 (01:06 +0000)
commit6f266dc1a0971c638882694caf12b01f78e5d7dc
treec56884aae09bed6bfa8b7ae1431203578a4bffce
parentb336a9b1ad4279bb6b18989a94ed641ddf9b456d
Fix a livelock in the objcache blocking code.  PCATCH was being improperly
passed to tsleep.

Fix harmless but inefficient wakeups in the objcache code.  When a thread
blocks on the objcache it tsleep's on the depot.  When objects are returned
to the objcache a wakeup is performed on the depot.  However, objects can
be returned to the depot OR returned to the current cpu's cache.  When an
object is returned to the current cpu's cache, only wakeup threads blocked
on the depot originating from the current cpu, rather then all cpus.

Reported-by: Stefan Krueger <skrueger@meinberlikomm.de>
Also-thanks-to: Peter Holms filesystem and load testing suite (stress2).
sys/kern/kern_objcache.c