常数相似" VM_RESERVED"和3.9.6中的nopage方法

时间:2013-06-26 04:14:59

标签: linux-kernel linux-device-driver

在3.9.6中找不到VM_RESERVED常量和nopage方法(在vm_operations_struct中)。它们在3.9.6中的替代品是什么?

1 个答案:

答案 0 :(得分:8)

the patch removing VM_RESERVED中,作者有这样的建议:

  

很久以前,在v2.4中,VM_RESERVED将交换过程保持在VMA之外,   目前它失去了原意,但仍有一些影响:

 | effect                 | alternative flags
-+------------------------+---------------------------------------------
1| account as reserved_vm | VM_IO
2| skip in core dump      | VM_IO, VM_DONTDUMP
3| do not merge or expand | VM_IO, VM_DONTEXPAND, VM_HUGETLB, VM_PFNMAP
4| do not mlock           | VM_IO, VM_DONTEXPAND, VM_HUGETLB, VM_PFNMAP
     

因此,VM_RESERVED可以替换为VM_IO或对VM_DONTEXPAND | VM_DONTDUMP

vm_ops->nopage已替换为this patch中的vm_ops->fault