Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:lookup first element intersecting start-end. Caller holds sp->lock for* reading or for writing

Proto:static struct sp_node *sp_lookup(struct shared_policy *sp, unsigned long start, unsigned long end)

Type:struct sp_node

Parameter:

TypeParameterName
struct shared_policy *sp
unsigned longstart
unsigned longend
2309  n = rb_node
2311  When n cycle
2312  p = rb_entry(n, structsp_node, nd)
2314  If start >= end Then n = rb_right
2316  Else if end <= start Then n = rb_left
2318  Else Break
2321  If Not n Then Return NULL
2323  cycle
2324  struct sp_node * w = NULL
2325  prev = rb_prev(n)
2326  If Not prev Then Break
2328  w = rb_entry(prev, structsp_node, nd)
2329  If end <= start Then Break
2331  n = prev
2333  Return rb_entry(n, structsp_node, nd)
Caller
NameDescribe
mpol_shared_policy_lookupFind shared policy intersecting idx
shared_policy_replaceReplace a policy range.