函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:mm\page_counter.c Create Date:2022-07-27 17:41:45
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:page_counter_cancel - take pages out of the local counter*@counter: counter*@nr_pages: number of pages to cancel

函数原型:void page_counter_cancel(struct page_counter *counter, unsigned long nr_pages)

返回类型:void

参数:

类型参数名称
struct page_counter *counter
unsigned longnr_pages
59  new等于atomic_long_sub_return(nr_pages, & usage)
60  propagate_protected_usage(counter, new)
62  WARN_ON_ONCE(new < 0)
调用者
名称描述
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_unchargepage_counter_uncharge - hierarchically uncharge pages*@counter: counter*@nr_pages: number of pages to uncharge
hugetlb_cgroup_move_parentShould be called with hugetlb_lock held.* Since we are holding hugetlb_lock, pages cannot get moved from* active list or uncharged from the cgroup, So no need to get* page reference and test for page active here. This function* cannot fail.