# Kswapd experiment - allow kswapd to run on all cores. We only target zuma and
# zumapro because these are the only platforms where kswapd avoids big cores by
# default.

on property:vendor.perf.allow_experiments=1 \
    && property:ro.board.platform=zuma \
    && property:vendor.pixel.system.phenotype.Perf__kswapd_experiment=true
    write /sys/kernel/vendor_mm/kswapd_cpu_affinity 1ff

on property:vendor.perf.allow_experiments=1 \
    && property:ro.board.platform=zumapro \
    && property:vendor.pixel.system.phenotype.Perf__kswapd_experiment=true
    write /sys/kernel/vendor_mm/kswapd_cpu_affinity ff


# Kswapd experiment rampdown - restore CPU affinity to the default.

on property:vendor.perf.allow_experiments=1 \
    && property:ro.board.platform=zuma \
    && property:vendor.pixel.system.phenotype.Perf__kswapd_experiment=""
    # Value is from device/google/zuma/conf/init.zuma.rc
    write /sys/kernel/vendor_mm/kswapd_cpu_affinity ff

on property:vendor.perf.allow_experiments=1 \
    && property:ro.board.platform=zumapro \
    && property:vendor.pixel.system.phenotype.Perf__kswapd_experiment=""
    # Value is from device/google/zumapro/conf/init.zumapro.soc.rc
    write /sys/kernel/vendor_mm/kswapd_cpu_affinity 7f
