anolis: mm: avoid pgtable_share enabled by default
ANBZ: #9321 Currently pgtable_share is enabled after system initialization, better to disable it by default, and enable it when needed. Signed-off-by: Kaihao Bai <carlo.bai@linux.alibaba.com> Reviewed-by: Xu Yu <xuyu@linux.alibaba.com> Link: https://gitee.com/anolis/cloud-kernel/pulls/3345
This commit is contained in:
parent
9c618832da
commit
3fddefcb79
|
@ -48,7 +48,7 @@ static inline bool vma_is_pgtable_shadow(const struct vm_area_struct *vma)
|
|||
vma->vm_mm == vma->pgtable_share_data->mm;
|
||||
}
|
||||
|
||||
DECLARE_STATIC_KEY_TRUE(pgtable_share_enabled_key);
|
||||
DECLARE_STATIC_KEY_FALSE(pgtable_share_enabled_key);
|
||||
static inline bool pgtable_share_enable(void)
|
||||
{
|
||||
return static_branch_unlikely(&pgtable_share_enabled_key);
|
||||
|
|
|
@ -484,7 +484,7 @@ void pgtable_share_adjust_range(struct vm_area_struct *vma, unsigned long *start
|
|||
*end = ALIGN(*end, PMD_SIZE);
|
||||
}
|
||||
|
||||
DEFINE_STATIC_KEY_TRUE(pgtable_share_enabled_key);
|
||||
DEFINE_STATIC_KEY_FALSE(pgtable_share_enabled_key);
|
||||
static int __init setup_pgtable_share(char *s)
|
||||
{
|
||||
if (!strcmp(s, "1"))
|
||||
|
|
Loading…
Reference in New Issue