函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:mem_cgroup_move_account - move account of the page*@page: the page*@compound: charge the page as compound or small page*@from: mem_cgroup which the page is moved from.*@to: mem_cgroup which the page is moved to. @from != @to.

函数原型:static int mem_cgroup_move_account(struct page *page, bool compound, struct mem_cgroup *from, struct mem_cgroup *to)

返回类型:int

参数:

类型参数名称
struct page *page
boolcompound
struct mem_cgroup *from
struct mem_cgroup *to
5293  nr_pages等于如果compoundhpage_nr_pages(page)否则1
5297  VM_BUG_ON(from == to)
5298  VM_BUG_ON_PAGE(PageLRU(page), page)
5299  VM_BUG_ON(compound && !PageHuge() only returns true for hugetlbfs pages, but not for* normal or transparent huge pages.* PageTransHuge() returns true for both transparent huge and* hugetlbfs pages, but not normal pages. PageTransHuge() can only be)
5305  ret等于负EBUSY
5306  如果非Return true if the page was successfully locked则转到:out
5309  ret等于负EINVAL
5310  如果mem_cgroup不等于from则转到:out_unlock
5313  anon等于PageAnon(page)
5315  pgdat等于page_pgdat(page)
5316  from_vec等于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.
5317  to_vec等于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.
5319  spin_lock_irqsave( & taken only while moving_account > 0 , flags)
5321  如果非anonReturn true if this page is mapped into pagetables.* For compound page it returns true if any subpage of compound page is mapped.
5322  __mod_lruvec_state - update lruvec memory statistics*@lruvec: the lruvec*@idx: the stat item*@val: delta to add to the counter, can be negative* The lruvec is the intersection of the NUMA node and a cgroup
5323  __mod_lruvec_state - update lruvec memory statistics*@lruvec: the lruvec*@idx: the stat item*@val: delta to add to the counter, can be negative* The lruvec is the intersection of the NUMA node and a cgroup
5331  如果非anonPageDirty(page)则
5332  mapping等于page_mapping(page)
5340  如果Only test-and-set exist for PG_writeback. The unconditional operators are* risky: they bypass page accounting.
5341  __mod_lruvec_state - update lruvec memory statistics*@lruvec: the lruvec*@idx: the stat item*@val: delta to add to the counter, can be negative* The lruvec is the intersection of the NUMA node and a cgroup
5342  __mod_lruvec_state - update lruvec memory statistics*@lruvec: the lruvec*@idx: the stat item*@val: delta to add to the counter, can be negative* The lruvec is the intersection of the NUMA node and a cgroup
5352  mem_cgroup等于to
5354  spin_unlock_irqrestore( & taken only while moving_account > 0 , flags)
5356  ret等于0
5358  禁止中断()
5359  mem_cgroup_charge_statistics(to, page, compound, nr_pages)
5360  Check events in order.
5361  mem_cgroup_charge_statistics(from, page, compound, - nr_pages)
5362  Check events in order.
5363  开中断()
5364  out_unlock :
5365  lock_page - unlock a locked page*@page: the page* Unlocks the page and wakes up sleepers in ___wait_on_page_locked().* Also wakes sleepers in wait_on_page_writeback() because the wakeup* mechanism between PageLocked pages and PageWriteback pages is shared.
5366  out :
5367  返回:ret
调用者
名称描述
mem_cgroup_move_charge_pte_range