Skip to content

Change THP Message when AnonHugePages = 0 #254

@karlabbott

Description

@karlabbott

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions