函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:lock_page_memcg - lock a page->mem_cgroup binding*@page: the page* This function protects unlocked LRU pages from being moved to* another cgroup

函数原型:struct mem_cgroup *lock_page_memcg(struct page *page)

返回类型:struct mem_cgroup

参数:

类型参数名称
struct page *page
1974  _read_lock() - mark the beginning of an RCU read-side critical section* When synchronize_rcu() is invoked on one CPU while other CPUs* are within RCU read-side critical sections, then the* synchronize_rcu() is guaranteed to block until after all the other
1976  如果mem_cgroup_disabled()则返回:NULL
1978  again :
1979  memcg等于mem_cgroup
1980  如果此条件成立可能性小(为编译器优化)(!memcg)则返回:NULL
1983  如果atomic_read( & * set > 0 if pages under this cgroup are moving to other cgroup.)小于等于0则返回:memcg
1986  spin_lock_irqsave( & taken only while moving_account > 0 , flags)
1987  如果memcg不等于mem_cgroup
1988  spin_unlock_irqrestore( & taken only while moving_account > 0 , flags)
1989  转到:again
1997  move_lock_task等于当前进程
1998  move_lock_flags等于flags
2000  返回:memcg
调用者
名称描述
__cancel_dirty_pageThis cancels just the dirty bit on the kernel page itself, it does NOT* actually remove dirty bits on any mmap's that may be around
test_clear_page_writeback
__test_set_page_writeback
page_add_file_rmappage_add_file_rmap - add pte mapping to a file page*@page: the page to add the mapping to*@compound: charge the page as compound or small page* The caller needs to hold the pte lock.
page_remove_file_rmap
mark_buffer_dirtymark_buffer_dirty - mark a buffer_head as needing writeout*@bh: the buffer_head to mark dirty* mark_buffer_dirty() will set the dirty bit against the buffer, then set* its backing page dirty, then tag the page as dirty in the page cache* and then attach
iomap_set_page_dirty
__set_page_dirty_nobuffersFor address_spaces which do not use buffers. Just tag the page as dirty in* the xarray.* This is also used when a single buffer is being dirtied: we want to set the* page dirty in that case, but not all the buffers. This is a "bottom-up"
__set_page_dirty_buffersAdd a page to the dirty page list.* It is a sad fact of life that this function is called from several places* deeply under spinlocking. It may not sleep.* If the page has buffers, the uptodate buffers are set dirty, to preserve