Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:Initialize a newly allocated zspage

Proto:static void init_zspage(struct size_class *class, struct zspage *zspage)

Type:void

Parameter:

TypeParameterName
struct size_class *class
struct zspage *zspage
985  freeobj = 1
986  off = 0
987  page = get_first_page(zspage)
989  When page cycle
994  set_first_obj_offset(page, off)
996  vaddr = kmap_atomic(page)
997  link = vaddr + off / size of link
1009  next_page = get_next_page(page)
1010  If next_page Then
1012  Else
1019  Prevent people trying to call kunmap_atomic() as if it were kunmap()* kunmap_atomic() should get the return value of kmap_atomic, not the page.(vaddr)
1020  page = next_page
1021  off %= PAGE_SIZE
1024  set_freeobj(zspage, 0)
Caller
NameDescribe
alloc_zspageAllocate a zspage for the given size class