Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:zs_free

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

Type:void

Parameter:

TypeParameterName
struct zs_pool *pool
unsigned longhandle
1551  If Value for the false possibility is greater at compile time(!handle) Then Return
1554  pin_tag(handle)
1555  obj = handle_to_obj(handle)
1556  bj_to_location - get (, ) from encoded object value*@obj: the encoded object value*@page: page object resides in zspage*@obj_idx: object index
1557  zspage = get_zspage(f_page)
1559  migrate_read_lock(zspage)
1561  get_zspage_mapping(zspage, & class_idx, & fullness)
1562  class = size_class[class_idx]
1564  spin_lock( & lock)
1565  obj_free(class, obj)
1566  fullness = Each size class maintains zspages in different fullness groups depending* on the number of live objects they contain. When allocating or freeing* objects, the fullness status of the page can change, say, from ALMOST_FULL
1567  If fullness != ZS_EMPTY Then
1568  migrate_read_unlock(zspage)
1569  Go to out
1572  isolated = is_zspage_isolated(zspage)
1573  migrate_read_unlock(zspage)
1575  If Value is more likely to compile time(!isolated) Then free_zspage(pool, class, zspage)
1577  out :
1579  spin_unlock( & lock)
1580  unpin_tag(handle)
1581  cache_free_handle(pool, handle)
Caller
NameDescribe
zs_zpool_free