Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change THP Message when AnonHugePages = 0 #254

Open
karlabbott opened this issue Jan 13, 2021 · 1 comment
Open

Change THP Message when AnonHugePages = 0 #254

karlabbott opened this issue Jan 13, 2021 · 1 comment

Comments

@karlabbott
Copy link

At present you have code that does:

      printf    "  %sTHP:%s\n", H2, H0
      if (Anonhugepages == 0)
        printf  "    THP Disabled\n"
      else {
        printf  "    %s kB allocated to THP %s\n", Anonhugepages, H0
      }

THP can still be enabled without the system having allocated any anonymous huge pages. The proper place to check if THP is enabled or not is:

[root@host ~]# cat /sys/kernel/mm/transparent_hugepage/enabled 
[always] madvise never

You could simply report the output of that setting or you could change your existing message from "THP Disabled" to "THP not in use."

At any rate, the code as it stands will flag THP disabled even if you have "enabled" set to always or madvise.

Karl

@superjamie
Copy link
Collaborator

I've changed the message for now, but I would like to make this more accurate in the future.

Thanks for the clear description!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants