函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:(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.

函数原型:static enum buddy handle_to_buddy(unsigned long handle)

返回类型:enum buddy

参数:

类型参数名称
unsigned longhandle
506  slots等于handle_to_slots(handle)
509  read_lock( & lock)
510  WARN_ON(handle & (1 << PAGE_HEADLESS))
511  addr等于handle
512  read_unlock( & lock)
513  zhdr等于addr按位与PAGE_MASK
514  返回:addrfirst_num按位与BUDDY_MASK
调用者
名称描述
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
z3fold_mapz3fold_map() - maps the allocation associated with the given handle*@pool: pool in which the allocation resides*@handle: handle associated with the allocation to be mapped* Extracts the buddy number from handle and constructs the pointer to the
z3fold_unmapz3fold_unmap() - unmaps the allocation associated with the given handle*@pool: pool in which the allocation resides*@handle: handle associated with the allocation to be unmapped