提交 36b945bb 编写于 作者: T Tang Yizhou 提交者: Yang Yingliang

mm: ascend: Fix compilation error of mem_cgroup_from_css()

ascend inclusion
category: bugfix
bugzilla: 46906, https://gitee.com/openeuler/kernel/issues/I4DZ7Q
CVE: NA

-------------------------------------------------

When CONFIG_MEMCG is disabled an CONFIG_MM_OWNER is enabled, we encounter
a compilation error as follows:

mm/hugepage_tuning.c: In function ‘get_mem_cgroup_from_path’:
mm/hugepage_tuning.c:130:8: error: implicit declaration of function
‘mem_cgroup_from_css’; did you mean ‘mem_cgroup_from_obj’?
[-Werror=implicit-function-declaration]
  mcg = mem_cgroup_from_css(of_css(of));
        ^~~~~~~~~~~~~~~~~~~
        mem_cgroup_from_obj
mm/hugepage_tuning.c:130:6: warning: assignment makes pointer from integer
without a cast [-Wint-conversion]
  mcg = mem_cgroup_from_css(of_css(of));

To fix it, let mm_update_next_owner() depend on CONFIG_MEMCG

Fixes: 719e31550652 ("arm64/ascend: Add auto tuning hugepage module")
Signed-off-by: NTang Yizhou <tangyizhou@huawei.com>
Reviewed-by: NKefeng Wang <wangkefeng.wang@huawei.com>
Reviewed-by: NDing Tianhong <dingtianhong@huawei.com>
Signed-off-by: NYang Yingliang <yangyingliang@huawei.com>
上级 8f220aae
......@@ -1446,6 +1446,7 @@ config ASCEND_WATCHDOG_SYSFS_CONFIGURE
config ASCEND_AUTO_TUNING_HUGEPAGE
bool "Enable support for the auto-tuning hugepage"
depends on HUGETLBFS
depends on MEMCG
default y
help
The hugepage auto-tuning means the kernel dynamically manages the number of
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册