函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:mem_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.

函数原型:void mem_cgroup_migrate(struct page *oldpage, struct page *newpage)

返回类型:void

参数:

类型参数名称
struct page *oldpage
struct page *newpage
6641  VM_BUG_ON_PAGE(!PageLocked(oldpage), oldpage)
6642  VM_BUG_ON_PAGE(!PageLocked(newpage), newpage)
6643  VM_BUG_ON_PAGE(PageAnon(oldpage) != PageAnon(newpage), newpage)
6644  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 != 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, newpage)
6647  如果mem_cgroup_disabled()则返回
6651  如果mem_cgroup则返回
6655  memcg等于mem_cgroup
6656  如果非memcg则返回
6660  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
6661  nr_pages等于如果compoundhpage_nr_pages(newpage)否则1
6663  page_counter_charge - hierarchically charge pages*@counter: counter*@nr_pages: number of pages to charge* NOTE: This does not consider any configured counter limits.
6664  如果Whether legacy memory+swap accounting is active page_counter_charge - hierarchically charge pages*@counter: counter*@nr_pages: number of pages to charge* NOTE: This does not consider any configured counter limits.
6666  获取指定CSS参考
6668  commit_charge(newpage, memcg, false)
6670  local_irq_save(flags)
6671  mem_cgroup_charge_statistics(memcg, newpage, compound, nr_pages)
6672  Check events in order.
6673  local_irq_restore(flags)
调用者
名称描述
migrate_page_statesCopy the page to its new location
replace_page_cache_pageplace_page_cache_page - replace a pagecache page with a new one*@old: page to be replaced*@new: page to replace with*@gfp_mask: allocation mode* This function replaces a page in the pagecache with a new one