Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name: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.

Proto:void mem_cgroup_migrate(struct page *oldpage, struct page *newpage)

Type:void

Parameter:

TypeParameterName
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  If mem_cgroup_disabled() Then Return
6651  If mem_cgroup Then Return
6655  memcg = mem_cgroup
6656  If Not memcg Then Return
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 = If compound Then hpage_nr_pages(newpage) Else 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  If Whether legacy memory+swap accounting is active Then 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  ss_get_many - obtain references on the specified css*@css: target css*@n: number of references to get* The caller must already have a reference.
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)
Caller
NameDescribe
migrate_page_statesCopy the page to its new location