函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:z3fold_free() - frees the allocation associated with the given handle*@pool: pool in which the allocation resided*@handle: handle associated with the allocation returned by z3fold_alloc()* In the case that the z3fold page in which the allocation resides

函数原型:static void z3fold_free(struct z3fold_pool *pool, unsigned long handle)

返回类型:void

参数:

类型参数名称
struct z3fold_pool *pool
unsigned longhandle
1228  zhdr等于rn locked z3fold page if it's not headless
1229  page等于virt_to_page(kaddr) returns a valid pointer if and only if* virt_addr_valid(kaddr) returns true.(zhdr)
1230  page_claimed等于st_and_set_bit - Set a bit and return its old value*@nr: Bit to set*@addr: Address to count from* This is an atomic fully-ordered operation (implied full memory barrier).
1232  如果st_bit - Determine whether a bit is set*@nr: bit number to test*@addr: Address to start counting from
1238  如果非page_claimed
1239  加自旋锁
1244  atomic64_dec( & pages_nr)
1246  返回
1250  bud等于(handle & BUDDY_MASK) < zhdr->first_num is possible in encode_handle* but that doesn't matter. because the masking will result in the* correct buddy number.
1253  :bud恒等于FIRST
1254  first_chunks等于0
1255  退出
1256  :bud恒等于MIDDLE
1257  middle_chunks等于0
1258  退出
1259  :bud恒等于LAST
1260  last_chunks等于0
1261  退出
1262  默认
1263  打印错误信息("%s: unknown bud %d\n", __func__, bud)
1264  WARN_ON(1)
1265  put_z3fold_header(zhdr)
1266  lear_bit - Clears a bit in memory*@nr: Bit to clear*@addr: Address to start counting from* This is a relaxed atomic operation (no implied memory barriers).
1267  返回
1270  如果非page_claimedfree_handle(handle)
1272  如果kref_put - decrement refcount for object.*@kref: object.*@release: pointer to the function that will clean up the object when the* last reference to the object is released.* This pointer is required, and it is not acceptable to pass kfree
1273  atomic64_dec( & pages_nr)
1274  返回
1276  如果page_claimed
1278  Unlock a z3fold page
1279  返回
1281  如果此条件成立可能性小(为编译器优化)(PageIsolated(page))或st_and_set_bit - Set a bit and return its old value*@nr: Bit to set*@addr: Address to count from* This is an atomic fully-ordered operation (implied full memory barrier).
1283  put_z3fold_header(zhdr)
1284  lear_bit - Clears a bit in memory*@nr: Bit to clear*@addr: Address to start counting from* This is a relaxed atomic operation (no implied memory barriers).
1285  返回
1287  如果cpu小于0或非cpu_online(cpu)则
1288  加自旋锁
1289  删除链表项并重新初始化
1290  自旋锁解锁
1291  cpu等于负1
1292  对象增加引用
1293  lear_bit - Clears a bit in memory*@nr: Bit to clear*@addr: Address to start counting from* This is a relaxed atomic operation (no implied memory barriers).
1294  do_compact_page(zhdr, true)
1295  返回
1297  对象增加引用
1298  lear_bit - Clears a bit in memory*@nr: Bit to clear*@addr: Address to start counting from* This is a relaxed atomic operation (no implied memory barriers).
1299  queue_work_on - queue work on specific cpu*@cpu: CPU number to execute work on*@wq: workqueue to use*@work: work to queue* We queue the work to a specific CPU, the caller must ensure it* can't go away.
1300  put_z3fold_header(zhdr)
调用者
名称描述
z3fold_zpool_free