函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:mem_cgroup_try_charge_swap - try charging swap space for a page*@page: page being added to swap*@entry: swap entry to charge* Try to charge @page's memcg for the swap space at @entry.* Returns 0 on success, -ENOMEM on failure.

函数原型:int mem_cgroup_try_charge_swap(struct page *page, swp_entry_t entry)

返回类型:int

参数:

类型参数名称
struct page *page
swp_entry_tentry
6930  nr_pages等于hpage_nr_pages(page)
6935  如果非cgroup_subsys_on_dfl - fast test on whether a subsys is on default hierarchy*@ss: subsystem in question(memory_cgrp_subsys)或非Whether the swap controller is active 则返回:0
6938  memcg等于mem_cgroup
6941  如果非memcg则返回:0
6944  如果非val
6945  memcg_memory_event(memcg, MEMCG_SWAP_FAIL)
6946  返回:0
6949  memcg等于mem_cgroup_id_get_online(memcg)
6951  如果非mem_cgroup_is_root(memcg)且非page_counter_try_charge - try to hierarchically charge pages*@counter: counter*@nr_pages: number of pages to charge*@fail: points first counter to hit its limit, if any* Returns %true on success, or %false and @fail if the counter or one
6953  memcg_memory_event(memcg, MEMCG_SWAP_MAX)
6954  memcg_memory_event(memcg, MEMCG_SWAP_FAIL)
6955  mem_cgroup_id_put(memcg)
6956  返回:负ENOMEM
6960  如果nr_pages大于1则mem_cgroup_id_get_many(memcg, nr_pages - 1)
6962  oldid等于swap_cgroup_record(entry, mem_cgroup_id(memcg), nr_pages)
6963  VM_BUG_ON_PAGE(oldid, page)
6964  dx can be of type enum memcg_stat_item or node_stat_item
6966  返回:0