| 1 | #!/bin/sh |
| 2 | # SPDX-License-Identifier: GPL-2.0 |
| 3 | # description: Change the ringbuffer size |
| 4 | # flags: instance |
| 5 | |
| 6 | rb_size_test() { |
| 7 | ORIG=`cat buffer_size_kb` |
| 8 | |
| 9 | expr $ORIG / 2 > buffer_size_kb |
| 10 | |
| 11 | expr $ORIG \* 2 > buffer_size_kb |
| 12 | |
| 13 | echo $ORIG > buffer_size_kb |
| 14 | } |
| 15 | |
| 16 | rb_size_test |
| 17 | |
| 18 | : "If per-cpu buffer is supported, imbalance it" |
| 19 | if [ -d per_cpu/cpu0 ]; then |
| 20 | cd per_cpu/cpu0 |
| 21 | rb_size_test |
| 22 | fi |