函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:mm\percpu.c Create Date:2022-07-27 15:50:43
Last Modify:2022-05-23 13:52:24 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:pcpu_block_update_hint_free - updates the block hints on the free path*@chunk: chunk of interest*@bit_off: chunk offset*@bits: size of request* Updates metadata for the allocation path. This avoids a blind block

函数原型:static void pcpu_block_update_hint_free(struct pcpu_chunk *chunk, int bit_off, int bits)

返回类型:void

参数:

类型参数名称
struct pcpu_chunk *chunk
intbit_off
intbits
934  nr_empty_pages等于0
946  s_index等于pcpu_off_to_block_index(bit_off)
947  e_index等于pcpu_off_to_block_index(bit_off + bits - 1)
948  s_off等于pcpu_off_to_block_off(bit_off)
949  e_off等于pcpu_off_to_block_off(bit_off + bits - 1)加1
951  s_block等于 metadata blocks s_index
952  e_block等于 metadata blocks e_index
964  start等于s_off
965  如果s_off恒等于contig hint for block lock relative startingposition of the contig hint
966  start等于lock relative startingposition of the contig hint
967  否则
974  l_bit等于查找最后的CPU标志位
976  start等于如果start恒等于l_bit则0否则l_bit加1
979  end等于e_off
980  如果e_off恒等于lock relative startingposition of the contig hint end等于lock relative startingposition of the contig hint contig hint for block
982  否则end等于在内存区域中找到下一个设置位
987  e_off等于如果s_index恒等于e_indexend否则PCPU_BITMAP_BLOCK_BITS
988  如果非starte_off恒等于PCPU_BITMAP_BLOCK_BITSnr_empty_pages自加
990  pcpu_block_update - updates a block given a free area*@block: block of interest*@start: start offset in block*@end: end offset in block* Updates a block given a known free area. The region [start, end) is
993  如果s_index不等于e_index
995  如果end恒等于PCPU_BITMAP_BLOCK_BITSnr_empty_pages自加
997  pcpu_block_update - updates a block given a free area*@block: block of interest*@start: start offset in block*@end: end offset in block* Updates a block given a known free area. The region [start, end) is
1000  nr_empty_pages加等于e_indexs_index减1
1001 block小于e_block循环
1003  scan hint for block 等于0
1011  如果nr_empty_pagespcpu_update_empty_pages - update empty page counters*@chunk: chunk of interest*@nr: nr of empty pages* This is used to keep track of the empty pages now based on the premise* a md_block covers a page. The hint update functions recognize if a block
1020  如果endstart大于等于PCPU_BITMAP_BLOCK_BITSs_index不等于e_indexpcpu_chunk_refresh_hint - updates metadata about a chunk*@chunk: chunk of interest*@full_scan: if we should scan from the beginning* Iterates over the metadata blocks to find the largest contig area
1022  否则pcpu_block_update - updates a block given a free area*@block: block of interest*@start: start offset in block*@end: end offset in block* Updates a block given a known free area. The region [start, end) is
调用者
名称描述
pcpu_free_areapcpu_free_area - frees the corresponding offset*@chunk: chunk of interest*@off: addr offset into chunk* This function determines the size of an allocation to free using* the boundary bitmap and clears the allocation map.