函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:mm\memory.c Create Date:2022-07-27 16:06:54
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:py one vm_area from one task to the other. Assumes the page tables* already present in the new task to be cleared in the whole range* covered by this vma.

函数原型:static inline unsigned long copy_one_pte(struct mm_struct *dst_mm, struct mm_struct *src_mm, pte_t *dst_pte, pte_t *src_pte, struct vm_area_struct *vma, unsigned long addr, int *rss)

返回类型:unsigned long

参数:

类型参数名称
struct mm_struct *dst_mm
struct mm_struct *src_mm
pte_t *dst_pte
pte_t *src_pte
struct vm_area_struct *vma
unsigned longaddr
int *rss
700  vm_flags等于Flags, see mm.h.
701  pte等于src_pte
705  如果此条件成立可能性小(为编译器优化)(!pte_present(pte))则
706  entry等于Convert the arch-dependent pte representation of a swp_entry_t into an* arch-independent swp_entry_t.
709  如果swap_duplicate(entry)小于0则返回:val
720  rss[MM_SWAPENTS]自加
721  否则如果is_migration_entry(entry)则
724  rss[mm_counter(page)]自加
738  否则如果is_device_private_entry(entry)则
750  get_page(page)
751  rss[mm_counter(page)]自加
752  page_dup_rmap(page, false)
768  转到:out_set_pte
775  如果is_cow_mapping(vm_flags)且pte_write(pte)则
776  ptep_set_wrprotect(src_mm, addr, src_pte)
777  pte等于pte_wrprotect(pte)
784  如果vm_flags按位与VM_SHAREDpte等于pte_mkclean(pte)
786  pte等于pte_mkold(pte)
788  page等于vm_normal_page -- This function gets the "struct page" associated with a pte.* "Special" mappings do not wish to be associated with a "struct page" (either* it doesn't exist, or it exists but they don't want to touch it). In this
789  如果page
790  get_page(page)
791  page_dup_rmap(page, false)
792  rss[mm_counter(page)]自加
793  否则如果pte_devmap(pte)则
794  page等于pte_page(pte)
797  out_set_pte :
798  set_pte_at(dst_mm, addr, dst_pte, pte)
799  返回:0
调用者
名称描述
copy_pte_range