Skip to contentSkip to conversation

What should we be doing to stress-test kfree_rcu()?

DISCUSSION Paul E. McKenney 3 participants 4 messages Apr 1, 2020 RCU

lore
Share & tools
lore

Paul E. McKenney

author maintainer
#0 lore raw

Hello!

What should we be doing to stress-test kfree_rcu(), including its ability to cope with OOM conditions? Yes, rcuperf runs are nice, but they are not currently doing much more than testing base functionality, performance, and scalability.

Thanx, Paul

#1 lore raw
Quoted 6 lines · Paul E. McKenney

Hello!

What should we be doing to stress-test kfree_rcu(), including its ability to cope with OOM conditions? Yes, rcuperf runs are nice, but they are not currently doing much more than testing base functionality, performance, and scalability.

I already stress kfree_rcu() with rcuperf right now to a point of OOM and make sure it does not OOM. The way I do this is set my VM to low memory (like 512MB) and then flood kfree_rcu()s. After the shrinker changes, I don't see OOM with my current rcuperf settings.

Not saying that my testing is sufficient, just saying this is what I do. It would be good to get a real workload to trigger lot of kfree_rcu() activity as well especially on low memory systems. Any ideas on that?

One idea could be to trigger memory pressure from unrelated allocations (such as userspace memory hogs), and see how it perform with memory-pressure. For one, the shrinker should trigger in such situations to force the queue into waiting for a GP in such situations instead of batching too much.

We are also missing vmalloc() tests. I remember Vlad had some clever vmalloc tests around for his great vmalloc rewrites :). Vlad, any thoughts on getting to stress kvfree_rcu()?

thanks,

- Joel

maintainer
#2 lore raw
Quoted 17 lines · Joel Fernandes
Quoted 6 lines · Paul E. McKenney

Hello!

What should we be doing to stress-test kfree_rcu(), including its ability to cope with OOM conditions? Yes, rcuperf runs are nice, but they are not currently doing much more than testing base functionality, performance, and scalability.

I already stress kfree_rcu() with rcuperf right now to a point of OOM and make sure it does not OOM. The way I do this is set my VM to low memory (like 512MB) and then flood kfree_rcu()s. After the shrinker changes, I don't see OOM with my current rcuperf settings.

Not saying that my testing is sufficient, just saying this is what I do. It would be good to get a real workload to trigger lot of kfree_rcu() activity as well especially on low memory systems. Any ideas on that?

Quoted 9 lines

One idea could be to trigger memory pressure from unrelated allocations (such as userspace memory hogs), and see how it perform with memory-pressure. For one, the shrinker should trigger in such situations to force the queue into waiting for a GP in such situations instead of batching too much.

We are also missing vmalloc() tests. I remember Vlad had some clever vmalloc tests around for his great vmalloc rewrites :). Vlad, any thoughts on getting to stress kvfree_rcu()?

Actually i updated(localy for my tests) the lib/test_vmalloc.c module with extra test cases to stress kvfree_rcu() stuff. I think i should add them :)

--
Vlad Rezki

author maintainer
#3 lore raw
Quoted 14 lines · Uladzislau Rezki
Quoted 13 lines · Joel Fernandes
Quoted 6 lines · Paul E. McKenney

Hello!

What should we be doing to stress-test kfree_rcu(), including its ability to cope with OOM conditions? Yes, rcuperf runs are nice, but they are not currently doing much more than testing base functionality, performance, and scalability.

I already stress kfree_rcu() with rcuperf right now to a point of OOM and make sure it does not OOM. The way I do this is set my VM to low memory (like 512MB) and then flood kfree_rcu()s. After the shrinker changes, I don't see OOM with my current rcuperf settings.

Quoted 8 lines
Quoted 8 lines

Not saying that my testing is sufficient, just saying this is what I do. It would be good to get a real workload to trigger lot of kfree_rcu() activity as well especially on low memory systems. Any ideas on that?

One idea could be to trigger memory pressure from unrelated allocations (such as userspace memory hogs), and see how it perform with memory-pressure. For one, the shrinker should trigger in such situations to force the queue into waiting for a GP in such situations instead of batching too much.

This would be good!

Quoted 6 lines
Quoted 4 lines

We are also missing vmalloc() tests. I remember Vlad had some clever vmalloc tests around for his great vmalloc rewrites :). Vlad, any thoughts on getting to stress kvfree_rcu()?

Actually i updated(localy for my tests) the lib/test_vmalloc.c module with extra test cases to stress kvfree_rcu() stuff. I think i should add them :)

As would this! ;-)

Thanx, Paul