Whamcloud - gitweb
LU-8522 tests: improve slabinfo accuracy when slub is used. 79/39579/3
authorMr NeilBrown <neilb@suse.de>
Thu, 6 Aug 2020 04:20:27 +0000 (14:20 +1000)
committerOleg Drokin <green@whamcloud.com>
Thu, 13 Aug 2020 06:04:48 +0000 (06:04 +0000)
commita6b5441de4269ee634a83fc717d3c28380c0fcfd
tree1240f0488cbf0432672d80fb42c09186ff3c8faa
parent6349e7a61199befe64ffc0b3221446719b8311eb
LU-8522 tests: improve slabinfo accuracy when slub is used.

The "active_objs" count in slabinfo is never very accurate, but when
CONFIG_SLUB is being used it is even less accurate than with
CONFIG_SLAB.

If CONFIG_SLUB_DEBUG is also enabled, it is possible to shrink the
cache and remove this inaccuracy by writing '1' to
   /sys/kernel/slab/$CACHENAME/shrink

So add appropriate code to sanity.sh so that when the 'shrink' file is
available, it is used.

Test-Parameters: trivial
Signed-off-by: Mr NeilBrown <neilb@suse.de>
Change-Id: I36179d4609b5e4bcd1de00f0b5921c9c6bed72b0
Reviewed-on: https://review.whamcloud.com/39579
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
lustre/tests/sanity.sh