Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:count_shadow_nodes

Proto:static unsigned long count_shadow_nodes(struct shrinker *shrinker, struct shrink_control *sc)

Type:unsigned long

Parameter:

TypeParameterName
struct shrinker *shrinker
struct shrink_control *sc
437  nodes = list_lru_shrink_count( & Shadow entries reflect the share of the working set that does not* fit into memory, so their number depends on the access pattern of* the workload, sc)
462  If current memcg being shrunk (for memcg aware shrinkers) Then
466  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.
467  When i < NR_LRU_LISTS cycle pages += lruvec_page_state_local(lruvec, NR_LRU_BASE + i)
470  pages += lruvec_page_state_local(lruvec, NR_SLAB_RECLAIMABLE)
471  pages += lruvec_page_state_local(lruvec, NR_SLAB_UNRECLAIMABLE)
472  Else pages = node_present_pages(current node being shrunk (for NUMA aware shrinkers) )
476  max_nodes = pages >> The xarray is constructed out of a set of 'chunks' of pointers - 3
478  If Not nodes Then Return SHRINK_EMPTY
481  If nodes <= max_nodes Then Return 0
483  Return nodes - max_nodes