函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:zs_unmap_object

函数原型:void zs_unmap_object(struct zs_pool *pool, unsigned long handle)

返回类型:void

参数:

类型参数名称
struct zs_pool *pool
unsigned longhandle
1362  obj等于handle_to_obj(handle)
1363  bj_to_location - get (, ) from encoded object value*@obj: the encoded object value*@page: page object resides in zspage*@obj_idx: object index
1364  zspage等于get_zspage(page)
1365  get_zspage_mapping(zspage, & class_idx, & fg)
1366  class等于size_class[class_idx]
1367  off等于* Size of objects stored in this class. Must be multiple * of ZS_ALIGN.obj_idx按位与PAGE_MASK的反
1369  area等于this_cpu_ptr( & per-cpu VM mapping areas for zspage accesses that cross page boundaries )
1370  如果off* Size of objects stored in this class. Must be multiple * of ZS_ALIGN.小于等于PAGE_SIZEPrevent people trying to call kunmap_atomic() as if it were kunmap()* kunmap_atomic() should get the return value of kmap_atomic, not the page.( address of kmap_atomic()'ed pages )
1372  否则
1375  pages[0]等于page
1376  pages[1]等于get_next_page(page)
1377  BUG_ON(!pages[1])
1379  __zs_unmap_object(area, pages, off, * Size of objects stored in this class. Must be multiple * of ZS_ALIGN.)
1381  The weird & is necessary because sparse considers (void)(var) to be* a direct dereference of percpu variable (var).(per-cpu VM mapping areas for zspage accesses that cross page boundaries )
1383  migrate_read_unlock(zspage)
1384  unpin_tag(handle)
调用者
名称描述
zs_zpool_unmap