Skip to content

Commit 03b73f6

Browse files
author
Alexey Avramov
committed
Update README
1 parent 50b6197 commit 03b73f6

File tree

1 file changed

+19
-1
lines changed

1 file changed

+19
-1
lines changed

README.md

+19-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ There are simple shell scripts and oneshot systemd services to enable or disable
55

66
## Usage
77

8-
Run `mglru` (get the state), `mglru0` (disable mg-LRU) or `mglru1` (enable mg-LRU). You can add the oneshot service to startup.
8+
Run `mglru` (get the state), `mglru0` (disable mg-LRU), `mglru1` (enable mg-LRU), `min_ttl_ms` (get `min_ttl_ms`) and `set_min_ttl_ms`. You can add the oneshot service to startup.
99

1010
Get the current state:
1111
```
@@ -19,6 +19,7 @@ Enable multigenerational LRU:
1919
```
2020
$ mglru1
2121
#!/bin/sh -v
22+
# Enable multigenerational LRU
2223
echo 1 | sudo tee /sys/kernel/mm/lru_gen/enabled
2324
1
2425
```
@@ -27,10 +28,27 @@ Disable multigenerational LRU:
2728
```
2829
$ mglru0
2930
#!/bin/sh -v
31+
# Disable multigenerational LRU
3032
echo 0 | sudo tee /sys/kernel/mm/lru_gen/enabled
3133
0
3234
```
3335

36+
Get `min_ttl_ms`:
37+
```
38+
$ min_ttl_ms
39+
#!/bin/sh -v
40+
cat /sys/kernel/mm/lru_gen/min_ttl_ms
41+
0
42+
```
43+
44+
Set `min_ttl_ms`:
45+
```
46+
$ set_min_ttl_ms 1000
47+
#!/bin/sh -v
48+
echo $1 | sudo tee /sys/kernel/mm/lru_gen/min_ttl_ms
49+
1000
50+
```
51+
3452
Disable multigenerational LRU during system boot:
3553
```
3654
$ sudo systemctl enable mglru0.service

0 commit comments

Comments
 (0)