[Unit]
Description=Multi-Gen LRU Enabler Service
ConditionPathExists=/sys/kernel/mm/lru_gen/enabled

[Service]
Type=oneshot

# Turn on MGLRU, valid values: [0; 7] and [yYnN]
ExecStart=/bin/bash -c "/bin/echo y > /sys/kernel/mm/lru_gen/enabled"

# Set the thrashing prevention vaule in milliseconds, valid values: >= 0
ExecStartPost=/bin/bash -c "/bin/echo 1000 > /sys/kernel/mm/lru_gen/min_ttl_ms"

[Install]
WantedBy=default.target