Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:Find alloced object in zspage from index object and* return handle.

Proto:static unsigned long find_alloced_obj(struct size_class *class, struct page *page, int *obj_idx)

Type:unsigned long

Parameter:

TypeParameterName
struct size_class *class
struct page *page
int *obj_idx
1656  offset = 0
1657  index = obj_idx
1658  handle = 0
1659  addr = kmap_atomic(page)
1661  offset = get_first_obj_offset(page)
1662  offset += * Size of objects stored in this class. Must be multiple * of ZS_ALIGN. * index
1664  When offset < PAGE_SIZE cycle
1665  head = obj_to_head(page, addr + offset)
1668  If trypin_tag(handle) Then Break
1670  handle = 0
1673  offset += * Size of objects stored in this class. Must be multiple * of ZS_ALIGN.
1674  index++
1677  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.(addr)
1679  obj_idx = index
1681  Return handle
Caller
NameDescribe
migrate_zspage