Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:mm\workingset.c Create Date:2022-07-28 14:33:13
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:workingset_refault - evaluate the refault of a previously evicted page*@page: the freshly allocated replacement page*@shadow: shadow entry of the evicted page* Calculates and evaluates the refault distance of the previously* evicted page in the context of

Proto:void workingset_refault(struct page *page, void *shadow)

Type:void

Parameter:

TypeParameterName
struct page *page
void *shadow
289  unpack_shadow(shadow, & memcgid, & pgdat, & eviction, & workingset)
291  _read_lock() - mark the beginning of an RCU read-side critical section* When synchronize_rcu() is invoked on one CPU while other CPUs* are within RCU read-side critical sections, then the* synchronize_rcu() is guaranteed to block until after all the other
308  eviction_memcg = mem_cgroup_from_id(memcgid)
309  If Not mem_cgroup_disabled() && Not eviction_memcg Then Go to out
311  eviction_lruvec = mem_cgroup_lruvec - get the lru list vector for a memcg & node*@memcg: memcg of the wanted lruvec* Returns the lru list vector holding pages for a given @memcg &*@node combination. This can be the node lruvec, if the memory* controller is disabled.
312  refault = atomic_long_read( & Evictions & activations on the inactive file list )
313  active_file = lruvec_page_state(eviction_lruvec, NR_ACTIVE_FILE)
331  refault_distance = refault - eviction & EVICTION_MASK
341  memcg = page_memcg(page)
342  lruvec = mem_cgroup_lruvec - get the lru list vector for a memcg & node*@memcg: memcg of the wanted lruvec* Returns the lru list vector holding pages for a given @memcg &*@node combination. This can be the node lruvec, if the memory* controller is disabled.
344  inc_lruvec_state(lruvec, WORKINGSET_REFAULT)
351  If refault_distance > active_file Then Go to out
354  SetPageActive(page)
355  advance_inactive_age(memcg, pgdat)
356  inc_lruvec_state(lruvec, WORKINGSET_ACTIVATE)
359  If workingset Then
360  SetPageWorkingset(page)
361  inc_lruvec_state(lruvec, WORKINGSET_RESTORE)
363  out :
364  _read_unlock() - marks the end of an RCU read-side critical section.* In most situations, rcu_read_unlock() is immune from deadlock.* However, in kernels built with CONFIG_RCU_BOOST, rcu_read_unlock()