Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:mm\memory.c Create Date:2022-07-28 14:40:08
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name: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.

Proto: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)

Type:unsigned long

Parameter:

TypeParameterName
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  If Value for the false possibility is greater at compile time(!pte_present(pte)) Then
706  entry = Convert the arch-dependent pte representation of a swp_entry_t into an* arch-independent swp_entry_t.
709  If swap_duplicate(entry) < 0 Then Return val
720  rss[MM_SWAPENTS]++
721  Else if is_migration_entry(entry) Then
724  rss[mm_counter(page)]++
738  Else if is_device_private_entry(entry) Then
750  get_page(page)
751  rss[mm_counter(page)]++
752  page_dup_rmap(page, false)
768  Go to out_set_pte
775  If is_cow_mapping(vm_flags) && pte_write(pte) Then
776  ptep_set_wrprotect(src_mm, addr, src_pte)
777  pte = pte_wrprotect(pte)
784  If vm_flags & VM_SHARED Then pte = 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  If page Then
790  get_page(page)
791  page_dup_rmap(page, false)
792  rss[mm_counter(page)]++
793  Else if pte_devmap(pte) Then
794  page = pte_page(pte)
797  out_set_pte :
798  set_pte_at(dst_mm, addr, dst_pte, pte)
799  Return 0
Caller
NameDescribe
copy_pte_range