函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:free_handle

函数原型:static inline void free_handle(unsigned long handle)

返回类型:void

参数:

类型参数名称
unsigned longhandle
312  如果handle按位与1左移PAGE_HEADLESS位则返回
315  如果WARN_ON( * (unsignedlong * )handle == 0)则返回
318  zhdr等于Returns the z3fold page where a given handle is stored
319  slots等于handle_to_slots(handle)
320  write_lock( & lock)
321  handle等于0
322  write_unlock( & lock)
323  如果slots恒等于slots则返回
327  foreign_handles自减
328  is_free = true
329  read_lock( & lock)
330  如果非st_bit - Determine whether a bit is set*@nr: bit number to test*@addr: Address to start counting from
331  read_unlock( & lock)
332  返回
334 i小于等于BUDDY_MASK循环
336  is_free = false
337  退出
340  read_unlock( & lock)
342  如果is_free
343  pool等于slots_to_pool(slots)
345  kmem_cache_free(c_handle, slots)
调用者
名称描述
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_reclaim_pagez3fold_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