函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:zs_map_object - get address of allocated object from handle.*@pool: pool from which the object was allocated*@handle: handle returned from zs_malloc*@mm: maping mode to use* Before using an object allocated from zs_malloc, it must be mapped using

函数原型:void *zs_map_object(struct zs_pool *pool, unsigned long handle, enum zs_mapmode mm)

返回类型:void

参数:

类型参数名称
struct zs_pool *pool
unsigned longhandle
enum zs_mapmodemm
1311  BUG_ON(in_interrupt())
1314  pin_tag(handle)
1316  obj等于handle_to_obj(handle)
1317  bj_to_location - get (, ) from encoded object value*@obj: the encoded object value*@page: page object resides in zspage*@obj_idx: object index
1318  zspage等于get_zspage(page)
1321  migrate_read_lock(zspage)
1323  get_zspage_mapping(zspage, & class_idx, & fg)
1324  class等于size_class[class_idx]
1325  off等于* Size of objects stored in this class. Must be multiple * of ZS_ALIGN.obj_idx按位与PAGE_MASK的反
1327  area等于Must be an lvalue. Since @var must be a simple identifier,* we force a syntax error here if it isn't.(per-cpu VM mapping areas for zspage accesses that cross page boundaries )
1328  mapping mode 等于mm
1329  如果off* Size of objects stored in this class. Must be multiple * of ZS_ALIGN.小于等于PAGE_SIZE
1331  address of kmap_atomic()'ed pages 等于kmap_atomic(page)
1332  ret等于 address of kmap_atomic()'ed pages off
1333  转到:out
1337  pages[0]等于page
1338  pages[1]等于get_next_page(page)
1339  BUG_ON(!pages[1])
1341  ret等于__zs_map_object(area, pages, off, * Size of objects stored in this class. Must be multiple * of ZS_ALIGN.)
1342  out :
1343  如果此条件成立可能性大(为编译器优化)(!PageHugeObject(page))则ret加等于ZS_HANDLE_SIZE
1346  返回:ret
调用者
名称描述
zs_zpool_map