Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name: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.

Proto:void lru_add_drain_cpu(int cpu)

Type:void

Parameter:

TypeParameterName
intcpu
596  pvec = per_cpu(lru_add_pvec, cpu)
598  If pagevec_count(pvec) Then 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  If pagevec_count(pvec) Then
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  If pagevec_count(pvec) Then 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  If pagevec_count(pvec) Then pagevec_lru_move_fn(pvec, lru_deactivate_fn, NULL)
619  pvec = per_cpu(lru_lazyfree_pvecs, cpu)
620  If pagevec_count(pvec) Then pagevec_lru_move_fn(pvec, lru_lazyfree_fn, NULL)
623  activate_page_drain(cpu)
Caller
NameDescribe
lru_add_drain
page_alloc_cpu_dead