Function report |
Source Code:mm\mlock.c |
Create Date:2022-07-28 14:45:40 |
Last Modify:2022-05-23 14:12:58 | Copyright©Brick |
home page | Tree |
Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:mlock_fixup - handle mlock[all]/munlock[all] requests.* Filters out "special" vmas -- VM_LOCKED never gets set for these, and* munlock is a no-op. However, for some special vmas, we go ahead and* populate the ptes.
Proto:static int mlock_fixup(struct vm_area_struct *vma, struct vm_area_struct **prev, unsigned long start, unsigned long end, vm_flags_t newflags)
Type:int
Parameter:
Type | Parameter | Name |
---|---|---|
struct vm_area_struct * | vma | |
struct vm_area_struct ** | prev | |
unsigned long | start | |
unsigned long | end | |
vm_flags_t | newflags |
525 | ret = 0 |
527 | old_flags = Flags, see mm.h. |
529 | If newflags == Flags, see mm.h. || Flags, see mm.h. & Special vmas that are non-mergable, non-mlock()able.* Note: mm/huge_memory.c VM_NO_THP depends on this definition. || is_vm_hugetlb_page(vma) || vma == get_gate_vma(mm) || vma_is_dax(vma) Then Go to out |
535 | pgoff = Offset (within vm_file) in PAGE_SIZEunits + ( start - Our start address within vm_mm. >> PAGE_SHIFT determines the page size ) |
536 | prev = vma_merge(mm, * prev, start, end, newflags, Serialized by page_table_lock , File we map to (can be NULL). , pgoff, vma_policy(vma), vm_userfaultfd_ctx) |
539 | If prev Then |
544 | If start != Our start address within vm_mm. Then |
550 | If end != The first byte after our end addresswithin vm_mm. Then |
556 | success : |
560 | nr_pages = end - start >> PAGE_SHIFT determines the page size |
573 | If lock Then Flags, see mm.h. = newflags |
578 | out : |
580 | Return ret |
Name | Describe |
---|---|
apply_vma_lock_flags | |
apply_mlockall_flags | Take the MCL_* flags passed into mlockall (or 0 if called from munlockall)* and translate into the appropriate modifications to mm->def_flags and/or the* flags for all current VMAs.* There are a couple of subtleties with this |
Source code conversion tool public plug-in interface | X |
---|---|
Support c/c++/esqlc/java Oracle/Informix/Mysql Plug-in can realize: logical Report Code generation and batch code conversion |