Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:mm\mempolicy.c Create Date:2022-07-28 15:32:50
Last Modify:2020-03-17 22:28:11 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:Depending on the memory policy provide a node from which to allocate the* next slab entry.

Proto:unsigned int mempolicy_slab_node(void)

Type:unsigned int

Parameter:Nothing

1859  node = Returns the number of the nearest Node with memory
1861  If in_interrupt() Then Return node
1864  policy = mempolicy
1865  If Not policy || See set_mempolicy() MPOL_F_* above & preferred local allocation Then Return node
1869  Case See MPOL_* above == MPOL_PREFERRED
1873  Return preferred
1875  Case See MPOL_* above == MPOL_INTERLEAVE
1876  Return Do dynamic interleaving for a process
1878  Case See MPOL_* above == MPOL_BIND
1886  highest_zoneidx = gfp_zone(GFP_KERNEL)
1887  zonelist = node_zonelists[ZONELIST_FALLBACK]
1888  z = - Zoneref pointer for the first suitable zone found (see below)
1890  Return If Pointer to actual zone Then zone_to_nid(Pointer to actual zone ) Else node
1893  Default
1894  BUG()
Caller
NameDescribe
alternate_node_allocTry allocating on another node if PFA_SPREAD_SLAB is a mempolicy is set.* If we are in_interrupt, then process context, including cpusets and* mempolicy, may not apply and should not be used for allocation policy.
fallback_allocFallback function if there was no memory available and no objects on a* certain node and fall back is permitted. First we scan all the* available node for available objects. If that fails then we* perform an allocation without specifying a node
get_any_partialGet a page from somewhere. Search in increasing NUMA distances.