Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:mm\percpu.c Create Date:2022-07-28 14:26:45
Last Modify:2022-05-23 13:52:24 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:pcpu_chunk_populated - post-population bookkeeping*@chunk: pcpu_chunk which got populated*@page_start: the start page*@page_end: the end page* Pages in [@page_start,@page_end) have been populated to @chunk. Update* the bookkeeping information accordingly

Proto:static void pcpu_chunk_populated(struct pcpu_chunk *chunk, int page_start, int page_end)

Type:void

Parameter:

TypeParameterName
struct pcpu_chunk *chunk
intpage_start
intpage_end
1475  nr = page_end - page_start
1477  lockdep_assert_held( & pcpu_lock)
1479  bitmap_set( populated bitmap , page_start, nr)
1480  # of populated pages += nr
1481  The number of populated pages in use by the allocator, protected by* pcpu_lock. This number is kept per a unit per chunk (i.e. when a page gets* allocated/deallocated, it is allocated/deallocated in all units of a chunk += nr
1483  pcpu_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
Caller
NameDescribe
pcpu_allocpcpu_alloc - the percpu allocator*@size: size of area to allocate in bytes*@align: alignment of area (max PAGE_SIZE)*@reserved: allocate from the reserved chunk if available*@gfp: allocation flags* Allocate percpu area of @size bytes aligned at @align
pcpu_balance_workfnBalance work is used to populate or destroy chunks asynchronously. We* try to keep the number of populated free pages between* PCPU_EMPTY_POP_PAGES_LOW and HIGH for atomic allocations and at most one* empty chunk.