forked from torvalds/linux
-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
lib/percpu_test: Add extra tests in percpu_test
While debugging a issue, we needed to stress test the percpu alloc/free path. Hence added some tests in lib/percpu_test to stress test percpu subsystem for allocation with different sizes. This patch keeps the default behavior of insmod module same for default test. But when given insmod with different option, it can run a percpu_stressd daemon (percpu_test_num=2) which does a stress test evey 10secs unless the module is unloaded. We found this to be helpful in our testing, since with this we could easily excercise percpu allo/free path. Hence cleaned this up for inclusion in percpu_test module. Logs ====== qemu-> sudo insmod /mnt/percpu_test.ko percpu_test_num=0 [ 334.362973] percpu_test: INIT, interval: 1000, max_shift: 13, run_tests: percpu_verify [ 334.364946] TEST Starts: percpu_verify [ 334.365601] TEST Completed: percpu_verify insmod: ERROR: could not insert module /mnt/percpu_test.ko: Resource temporarily unavailable qemu-> sudo insmod /mnt/percpu_test.ko percpu_test_num=1 [ 336.556464] percpu_test: INIT, interval: 1000, max_shift: 13, run_tests: percpu_stress [ 336.558388] TEST Starts: percpu_stress [ 336.560611] TEST Completed: percpu_stress insmod: ERROR: could not insert module /mnt/percpu_test.ko: Resource temporarily unavailable qemu-> sudo insmod /mnt/percpu_test.ko percpu_test_num=2 [ 339.164406] percpu_test: INIT, interval: 1000, max_shift: 13, run_tests: percpu_stressd [ 339.165935] TEST Starts: percpu_stressd [ 339.167033] TEST Completed: percpu_stressd [ 339.167082] DAEMON: starts percpu_stressd [ 339.168498] TEST Starts: percpu_stressd: iter (1) [ 339.182530] TEST Completed: percpu_stressd: iter (1) [ 349.341109] TEST Starts: percpu_stressd: iter (2) [ 349.344447] TEST Completed: percpu_stressd: iter (2) [ 359.580829] TEST Starts: percpu_stressd: iter (3) [ 359.584315] TEST Completed: percpu_stressd: iter (3) [ 369.820471] TEST Starts: percpu_stressd: iter (4) [ 369.844402] TEST Completed: percpu_stressd: iter (4) qemu-> sudo rmmod percpu_test [ 375.001098] percpu_test: EXIT [qemu][~] Cc: Aneesh Kumar K.V <aneesh.kumar@linux.ibm.com> Cc: Vaibhav Jain <vaibhav@linux.ibm.com> Signed-off-by: Ritesh Harjani <riteshh@linux.ibm.com>
- Loading branch information
1 parent
0534838
commit a128771
Showing
1 changed file
with
191 additions
and
49 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters