函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

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

函数原型:void mem_cgroup_swapout(struct page *page, swp_entry_t entry)

返回类型:void

参数:

类型参数名称
struct page *page
swp_entry_tentry
6866  VM_BUG_ON_PAGE(PageLRU(page), page)
6867  VM_BUG_ON_PAGE(page_count(page), page)
6869  如果非Whether legacy memory+swap accounting is active 则返回
6872  memcg等于mem_cgroup
6875  如果非memcg则返回
6883  swap_memcg等于mem_cgroup_id_get_online(memcg)
6884  nr_entries等于hpage_nr_pages(page)
6886  如果nr_entries大于1则mem_cgroup_id_get_many(swap_memcg, nr_entries - 1)
6888  oldid等于swap_cgroup_record(entry, mem_cgroup_id(swap_memcg), nr_entries)
6890  VM_BUG_ON_PAGE(oldid, page)
6891  dx can be of type enum memcg_stat_item or node_stat_item
6893  mem_cgroup = NULL
6895  如果非mem_cgroup_is_root(memcg)则page_counter_uncharge - hierarchically uncharge pages*@counter: counter*@nr_pages: number of pages to uncharge
6898  如果memcg不等于swap_memcg
6899  如果非mem_cgroup_is_root(swap_memcg)则page_counter_charge - hierarchically charge pages*@counter: counter*@nr_pages: number of pages to charge* NOTE: This does not consider any configured counter limits.
6901  page_counter_uncharge - hierarchically uncharge pages*@counter: counter*@nr_pages: number of pages to uncharge
6910  VM_BUG_ON(!已禁止中断())
6911  mem_cgroup_charge_statistics(memcg, 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, - nr_entries)
6913  Check events in order.
6915  如果非mem_cgroup_is_root(memcg)则设置一个css引用
调用者
名称描述
__remove_mappingSame as remove_mapping, but if the page is removed from the mapping, it* gets returned with a refcount of 0.