1

I am running Gentoo Linux Hardened using kernel 4.3.3-hardened-r4 on an AMD A4-5300 APU. To troubleshoot a memory problem I have with my system I need to enable sysctl vm.zone_reclaim_mode=1, but doing so results in the following error message:

sysctl: cannot stat /proc/sys/vm/zone_reclaim_mode: No such file or directory

Being this Gentoo, that error message probably means I missed compiling some kernel feature. However, I looked around on the kernel's configuration menu (make menuconfig) and couldn't find any option, and the internet wasn't conclusive at all when looking up online how to enable this option. The closest thing I could find was this Linux kernel's documentation page that explains all the configuration files located under /proc/sys/vm.

What do I have to do to be able to use vm.zone_reclaim_mode=1?

  • 1
    have you NUMA enabled in your kernel configuration? – Scantlight Apr 7 '16 at 21:49
  • Apparently not. I just went over the NUMA-related options and found CONFIG_NUMA disabled. I just enabled it and my kernel is currently compiling. – RAKK Apr 8 '16 at 16:42
  • Enabling CONFIG_NUMA worked like a charm. Mind if you post it as an answer to this question? – RAKK Apr 8 '16 at 18:34
  • I would like to post it as an answer and I will try to do so as soon as I will know better how NUMA is related with zone_reclaim_mode :) ... For now it was just a good intuition. – Scantlight Apr 8 '16 at 19:25
  • The kernel documentation linked above says "zone_reclaim may be enabled if it's known that the workload is partitioned such that each partition fits within a NUMA node". My reading comprehension is limited here because I don't know much about memory handling on AMD64 and Linux, but it mentions working with NUMA so I guess if NUMA is not supported then there won't be any zone reclaim. – RAKK Apr 9 '16 at 2:05
0

I'm answering my own question since it hasn't gotten any answer and the solution suggested on the comments worked like a charm.

I solved this by enabling CONFIG_NUMA in my kernel configuration and rebuilding it. After booting my new kernel I could enable sysctl vm.zone_reclaim_mode=1 without a hitch.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.