函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:z3fold_reclaim_page() - evicts allocations from a pool page and frees it*@pool: pool from which a page will attempt to be evicted*@retries: number of pages on the LRU list for which eviction will* be attempted before failing* z3fold reclaim is different

函数原型:static int z3fold_reclaim_page(struct z3fold_pool *pool, unsigned int retries)

返回类型:int

参数:

类型参数名称
struct z3fold_pool *pool
unsigned intretries
1341  ret等于负1
1342  struct z3fold_header * zhdr = NULL
1343  struct page * page = NULL
1345  first_handle等于0, middle_handle等于0, last_handle等于0
1347  加自旋锁
1348  如果非ops或非evictretries恒等于0则
1349  自旋锁解锁
1350  返回:负EINVAL
1352 i小于retries循环
1353  如果链表为空
1355  返回:负EINVAL
1364  page = NULL
1365  继续下一循环
1373  zhdr等于page_address(page)
1377  如果非Try to lock a z3fold page
1382  如果foreign_handles
1390  cpu等于负1
1391  退出
1394  如果非zhdr退出
1397  删除链表项并重新初始化
1398  自旋锁解锁
1407  first_handle等于0
1408  last_handle等于0
1409  middle_handle等于0
1421  否则
1423  last_handle等于middle_handle等于0
1426  如果middle_handle
1427  ret等于evict(pool, middle_handle)
1428  如果ret则转到:next
1432  如果first_handle
1433  ret等于evict(pool, first_handle)
1434  如果ret则转到:next
1438  如果last_handle
1439  ret等于evict(pool, last_handle)
1440  如果ret则转到:next
1444  :
1446  如果ret恒等于0则
1451  加自旋锁
1455  否则
1459  atomic64_dec( & pages_nr)
1460  返回:0
1467  加自旋锁
1475  加自旋锁
1477  自旋锁解锁
1478  返回:负EAGAIN
调用者
名称描述
z3fold_zpool_shrink