OSDN Git Service

rcuperf: Measure memory footprint during kfree_rcu() test
authorJoel Fernandes (Google) <joel@joelfernandes.org>
Thu, 19 Dec 2019 16:22:42 +0000 (11:22 -0500)
committerPaul E. McKenney <paulmck@kernel.org>
Fri, 21 Feb 2020 00:03:31 +0000 (16:03 -0800)
commit12af660321263d7744d5d06b765c7b03fade3858
tree3088fbbb76bffa282851d4a39545363eee23473a
parent5396d31d3a396039502f75a128bd8064819cba61
rcuperf: Measure memory footprint during kfree_rcu() test

During changes to kfree_rcu() code, we often check the amount of free
memory.  As an alternative to checking this manually, this commit adds a
measurement in the test itself.  It measures four times during the test
for available memory, digitally filters these measurements to produce a
running average with a weight of 0.5, and compares this digitally filtered
value with the amount of available memory at the beginning of the test.

Something like the following is printed at the end of the run:

Total time taken by all kfree'ers: 6369738407 ns, loops: 10000, batches: 764, memory footprint: 216MB

Signed-off-by: Joel Fernandes (Google) <joel@joelfernandes.org>
Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
kernel/rcu/rcuperf.c