hugetlb_cgroup.h 889 B

12345678910111213141516171819202122232425262728293031323334353637
  1. /*
  2. * Copyright IBM Corporation, 2012
  3. * Author Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
  4. *
  5. * This program is free software; you can redistribute it and/or modify it
  6. * under the terms of version 2.1 of the GNU Lesser General Public License
  7. * as published by the Free Software Foundation.
  8. *
  9. * This program is distributed in the hope that it would be useful, but
  10. * WITHOUT ANY WARRANTY; without even the implied warranty of
  11. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  12. *
  13. */
  14. #ifndef _LINUX_HUGETLB_CGROUP_H
  15. #define _LINUX_HUGETLB_CGROUP_H
  16. #include <linux/res_counter.h>
  17. struct hugetlb_cgroup;
  18. #ifdef CONFIG_CGROUP_HUGETLB
  19. static inline bool hugetlb_cgroup_disabled(void)
  20. {
  21. if (hugetlb_subsys.disabled)
  22. return true;
  23. return false;
  24. }
  25. #else
  26. static inline bool hugetlb_cgroup_disabled(void)
  27. {
  28. return true;
  29. }
  30. #endif /* CONFIG_MEM_RES_CTLR_HUGETLB */
  31. #endif