2 # SPDX-License-Identifier: GPL-2.0
4 # Kselftest framework requirement - SKIP code is 4.
13 damon_lru_sort_enabled
="/sys/module/damon_lru_sort/parameters/enabled"
14 if [ ! -f "$damon_lru_sort_enabled" ]
16 echo "No 'enabled' file. Maybe DAMON_LRU_SORT not built"
20 nr_kdamonds
=$
(pgrep kdamond |
wc -l)
21 if [ "$nr_kdamonds" -ne 0 ]
23 echo "Another kdamond is running"
27 echo Y
> "$damon_lru_sort_enabled"
28 nr_kdamonds
=$
(pgrep kdamond |
wc -l)
29 if [ "$nr_kdamonds" -ne 1 ]
31 echo "kdamond is not turned on"
35 echo N
> "$damon_lru_sort_enabled"
36 nr_kdamonds
=$
(pgrep kdamond |
wc -l)
37 if [ "$nr_kdamonds" -ne 0 ]
39 echo "kdamond is not turned off"