函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:Find alloced object in zspage from index object and* return handle.

函数原型:static unsigned long find_alloced_obj(struct size_class *class, struct page *page, int *obj_idx)

返回类型:unsigned long

参数:

类型参数名称
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 offset小于PAGE_SIZE循环
1665  head等于obj_to_head(page, addr + offset)
1668  如果trypin_tag(handle)则退出
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  返回:handle
调用者
名称描述
migrate_zspage