Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:propagate_protected_usage

Proto:static void propagate_protected_usage(struct page_counter *c, unsigned long usage)

Type:void

Parameter:

TypeParameterName
struct page_counter *c
unsigned longusage
22  If Not parent Then Return
25  If min || atomic_long_read( & min_usage) Then
26  If usage <= min Then protected = usage
28  Else protected = 0
31  old_protected = atomic_long_xchg( & min_usage, protected)
32  delta = protected - old_protected
33  If delta Then atomic_long_add(delta, & children_min_usage)
37  If low || atomic_long_read( & low_usage) Then
38  If usage <= low Then protected = usage
40  Else protected = 0
43  old_protected = atomic_long_xchg( & low_usage, protected)
44  delta = protected - old_protected
45  If delta Then atomic_long_add(delta, & children_low_usage)
Caller
NameDescribe
page_counter_cancelpage_counter_cancel - take pages out of the local counter*@counter: counter*@nr_pages: number of pages to cancel
page_counter_chargepage_counter_charge - hierarchically charge pages*@counter: counter*@nr_pages: number of pages to charge* NOTE: This does not consider any configured counter limits.
page_counter_try_chargepage_counter_try_charge - try to hierarchically charge pages*@counter: counter*@nr_pages: number of pages to charge*@fail: points first counter to hit its limit, if any* Returns %true on success, or %false and @fail if the counter or one
page_counter_set_minpage_counter_set_min - set the amount of protected memory*@counter: counter*@nr_pages: value to set* The caller must serialize invocations on the same counter.
page_counter_set_lowpage_counter_set_low - set the amount of protected memory*@counter: counter*@nr_pages: value to set* The caller must serialize invocations on the same counter.