ksm.c (b5dd424181f33c2978562c64b286fc22cf5ef4bf) | ksm.c (9651fcedf7b92d3f7f1ab179e8ab55b85ee10fc1) |
---|---|
1// SPDX-License-Identifier: GPL-2.0-only 2/* 3 * Memory merging support. 4 * 5 * This code enables dynamic sharing of identical pages found in different 6 * memory areas, even if they are not shared by fork() 7 * 8 * Copyright (C) 2008-2009 Red Hat, Inc. --- 703 unchanged lines hidden (view full) --- 712 */ 713 return (ret & VM_FAULT_OOM) ? -ENOMEM : 0; 714} 715 716static bool vma_ksm_compatible(struct vm_area_struct *vma) 717{ 718 if (vma->vm_flags & (VM_SHARED | VM_MAYSHARE | VM_PFNMAP | 719 VM_IO | VM_DONTEXPAND | VM_HUGETLB | | 1// SPDX-License-Identifier: GPL-2.0-only 2/* 3 * Memory merging support. 4 * 5 * This code enables dynamic sharing of identical pages found in different 6 * memory areas, even if they are not shared by fork() 7 * 8 * Copyright (C) 2008-2009 Red Hat, Inc. --- 703 unchanged lines hidden (view full) --- 712 */ 713 return (ret & VM_FAULT_OOM) ? -ENOMEM : 0; 714} 715 716static bool vma_ksm_compatible(struct vm_area_struct *vma) 717{ 718 if (vma->vm_flags & (VM_SHARED | VM_MAYSHARE | VM_PFNMAP | 719 VM_IO | VM_DONTEXPAND | VM_HUGETLB | |
720 VM_MIXEDMAP)) | 720 VM_MIXEDMAP| VM_DROPPABLE)) |
721 return false; /* just ignore the advice */ 722 723 if (vma_is_dax(vma)) 724 return false; 725 726#ifdef VM_SAO 727 if (vma->vm_flags & VM_SAO) 728 return false; --- 3226 unchanged lines hidden --- | 721 return false; /* just ignore the advice */ 722 723 if (vma_is_dax(vma)) 724 return false; 725 726#ifdef VM_SAO 727 if (vma->vm_flags & VM_SAO) 728 return false; --- 3226 unchanged lines hidden --- |