函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:Drain pages out of the cpu's pagevecs.* Either "cpu" is the current CPU, and preemption has already been* disabled; or "cpu" is being hot-unplugged, and is already dead.

函数原型:void lru_add_drain_cpu(int cpu)

返回类型:void

参数:

类型参数名称
intcpu
596  pvec等于per_cpu(lru_add_pvec, cpu)
598  如果pagevec_count(pvec)则Add the passed pages to the LRU, then drop the caller's refcount* on them. Reinitialises the caller's pagevec.
601  pvec等于per_cpu(lru_rotate_pvecs, cpu)
602  如果pagevec_count(pvec)则
606  local_irq_save(flags)
607  pagevec_move_tail() must be called with IRQ disabled.* Otherwise this may cause nasty races.
608  local_irq_restore(flags)
611  pvec等于per_cpu(lru_deactivate_file_pvecs, cpu)
612  如果pagevec_count(pvec)则pagevec_lru_move_fn(pvec, If the page can not be invalidated, it is moved to the* inactive list to speed up its reclaim. It is moved to the* head of the list, rather than the tail, to give the flusher* threads some time to write it out, as this is much more, NULL)
615  pvec等于per_cpu(lru_deactivate_pvecs, cpu)
616  如果pagevec_count(pvec)则pagevec_lru_move_fn(pvec, lru_deactivate_fn, NULL)
619  pvec等于per_cpu(lru_lazyfree_pvecs, cpu)
620  如果pagevec_count(pvec)则pagevec_lru_move_fn(pvec, lru_lazyfree_fn, NULL)
623  activate_page_drain(cpu)
调用者
名称描述
lru_add_drain
page_alloc_cpu_dead