Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:mem_cgroup_charge_statistics

Proto:static void mem_cgroup_charge_statistics(struct mem_cgroup *memcg, struct page *page, bool compound, int nr_pages)

Type:void

Parameter:

TypeParameterName
struct mem_cgroup *memcg
struct page *page
boolcompound
intnr_pages
833  If PageAnon(page) Then __mod_memcg_state - update cgroup memory statistics*@memcg: the memory cgroup*@idx: the stat item - can be enum memcg_stat_item or enum node_stat_item*@val: delta to add to the counter, can be negative
835  Else
836  __mod_memcg_state - update cgroup memory statistics*@memcg: the memory cgroup*@idx: the stat item - can be enum memcg_stat_item or enum node_stat_item*@val: delta to add to the counter, can be negative
837  If PageSwapBacked(page) Then __mod_memcg_state - update cgroup memory statistics*@memcg: the memory cgroup*@idx: the stat item - can be enum memcg_stat_item or enum node_stat_item*@val: delta to add to the counter, can be negative
841  If compound Then
842  VM_BUG_ON_PAGE(!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, page)
843  __mod_memcg_state - update cgroup memory statistics*@memcg: the memory cgroup*@idx: the stat item - can be enum memcg_stat_item or enum node_stat_item*@val: delta to add to the counter, can be negative
847  If nr_pages > 0 Then __count_memcg_events - account VM events in a cgroup*@memcg: the memory cgroup*@idx: the event item*@count: the number of events that occured
849  Else
850  __count_memcg_events - account VM events in a cgroup*@memcg: the memory cgroup*@idx: the event item*@count: the number of events that occured
851  nr_pages = -nr_pages
854  __this_cpu_add(nr_page_events, nr_pages)
Caller
NameDescribe
mem_cgroup_move_accountmem_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.
mem_cgroup_commit_chargemem_cgroup_commit_charge - commit a page charge*@page: page to charge*@memcg: memcg to charge the page to*@lrucare: page might be on LRU already*@compound: charge the page as compound or small page* Finalize a charge transaction started by
mem_cgroup_migratemem_cgroup_migrate - charge a page's replacement*@oldpage: currently circulating page*@newpage: replacement page* Charge @newpage as a replacement page for @oldpage. @oldpage will* be uncharged upon free.
mem_cgroup_swapoutmem_cgroup_swapout - transfer a memsw charge to swap*@page: page whose memsw charge to transfer*@entry: swap entry to move the charge to* Transfer the memsw charge of @page to @entry.