• Joel Fernandes (Google)'s avatar
    rcuperf: Measure memory footprint during kfree_rcu() test · 12af6603
    Joel Fernandes (Google) authored
    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: default avatarJoel Fernandes (Google) <joel@joelfernandes.org>
    Signed-off-by: default avatarPaul E. McKenney <paulmck@kernel.org>
    12af6603
rcuperf.c 21.2 KB