函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:Initializes the z3fold header of a newly allocated z3fold page

函数原型:static struct z3fold_header *init_z3fold_page(struct page *page, bool headless, struct z3fold_pool *pool, gfp_t gfp)

返回类型:struct z3fold_header

参数:

类型参数名称
struct page *page
boolheadless
struct z3fold_pool *pool
gfp_tgfp
401  zhdr等于page_address(page)
404  初始化链表头
405  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).
406  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).
407  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).
408  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).
409  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).
410  如果headless则返回:zhdr
413  slots等于alloc_slots(pool, gfp)
414  如果非slots则返回:NULL
417  spin_lock_init( & page_lock)
418  初始化对象
419  first_chunks等于0
420  middle_chunks等于0
421  last_chunks等于0
422  first_num等于0
423  start_middle等于0
424  cpu等于负1
425  foreign_handles等于0
426  slots等于slots
427  pool等于pool
428  初始化链表头
429  INIT_WORK( & work, compact_page_work)
430  返回:zhdr
调用者
名称描述
z3fold_allocz3fold_alloc() - allocates a region of a given size*@pool: z3fold pool from which to allocate*@size: size in bytes of the desired allocation*@gfp: gfp flags used if the pool needs to grow*@handle: handle of the new allocation* This function will attempt