Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:zs_unmap_object

Proto:void zs_unmap_object(struct zs_pool *pool, unsigned long handle)

Type:void

Parameter:

TypeParameterName
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  If off + * Size of objects stored in this class. Must be multiple * of ZS_ALIGN. <= PAGE_SIZE Then 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.( address of kmap_atomic()'ed pages )
1372  Else
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)
Caller
NameDescribe
zs_zpool_unmap