函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:do_compact_page

函数原型:static void do_compact_page(struct z3fold_header *zhdr, bool locked)

返回类型:void

参数:

类型参数名称
struct z3fold_header *zhdr
boollocked
827  pool等于zhdr_to_pool(zhdr)
830  page等于virt_to_page(kaddr) returns a valid pointer if and only if* virt_addr_valid(kaddr) returns true.(zhdr)
831  如果lockedWARN_ON(Try to lock a z3fold page )
833  否则Lock a z3fold page
835  如果WARN_ON(!st_and_clear_bit - Clear a bit and return its old value*@nr: Bit to clear*@addr: Address to count from* This is an atomic fully-ordered operation (implied full memory barrier).)则
836  Unlock a z3fold page
837  返回
839  加自旋锁
840  删除链表项并重新初始化
841  自旋锁解锁
843  如果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
844  atomic64_dec( & pages_nr)
845  返回
848  如果此条件成立可能性小(为编译器优化)(PageIsolated(page) || st_bit - Determine whether a bit is set*@nr: bit number to test*@addr: Address to start counting from || st_bit - Determine whether a bit is set*@nr: bit number to test*@addr: Address to start counting from)则
851  Unlock a z3fold page
852  返回
855  如果非foreign_handlesbuddy_single(zhdr)且mapped_count恒等于0且compact_single_buddy(zhdr)则
857  如果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 kfreeatomic64_dec( & pages_nr)
859  否则Unlock a z3fold page
861  返回
864  Has to be called with lock held
865  Add to the appropriate unbuddied list
866  Unlock a z3fold page
调用者
名称描述
compact_page_work
z3fold_freez3fold_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