Whamcloud - gitweb
LU-5722 obdclass: reorganize busy object accounting 68/12468/5
authorFrank Zago <fzago@cray.com>
Tue, 28 Oct 2014 22:02:14 +0000 (17:02 -0500)
committerOleg Drokin <oleg.drokin@intel.com>
Sun, 8 Feb 2015 02:26:09 +0000 (02:26 +0000)
commitff0b34274d4f8754ebba0a5a812bd117cbec37b1
tree6415ba617a7febcc5c4317ec7c019dae2b785df4
parent4a656bc480baeb7ca2745a9565742fbcaedd81c1
LU-5722 obdclass: reorganize busy object accounting

Due to some accounting bug, lsb_busy of a hash bucket can become
larger than the total number of objects in said bucket. A busy object
can be counted more than once. When that happens, a negative value is
returned by the shrinker to Linux's shrink_slab() function. In older
kernel, such as 2.6.32 used in RHEL 6, this will cause a forever loop
inside shrink_slab(), in essence hanging the host.

Instead of trying (and failing) to count the busy objects, count the
objects than are not busy, i.e. the objects that are present on the
lsb_lru list. The number of busy objects is then the difference
between the number of objects in the hash and the objects on the
lsb_lru list.

Change-Id: Ia6973991a1ff7fc53cdf8132bf2aab532934cf94
Signed-off-by: frank zago <fzago@cray.com>
Reviewed-on: http://review.whamcloud.com/12468
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Jenkins
Reviewed-by: Mike Pershin <mike.pershin@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
lustre/include/lu_object.h
lustre/obdclass/lu_object.c