函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:deferred_split_scan

函数原型:static unsigned long deferred_split_scan(struct shrinker *shrink, struct shrink_control *sc)

返回类型:unsigned long

参数:

类型参数名称
struct shrinker *shrink
struct shrink_control *sc
2905  pgdata等于NUMA节点数据区(current node being shrunk (for NUMA aware shrinkers) )
2906  ds_queue等于deferred_split_queue
2908  LIST_HEAD(list), pos, next
2910  split等于0
2913  如果current memcg being shrunk (for memcg aware shrinkers) ds_queue等于deferred_split_queue
2917  spin_lock_irqsave( & split_queue_lock, flags)
2920  page等于list_entry - get the struct for this entry*@ptr: the &struct list_head pointer.*@type: the type of the struct this is embedded in.*@member: the name of the list_head within the struct.((void * )pos, structpage, mapping)
2921  page等于compound_head(page)
2922  如果Try to grab a ref unless the page has a refcount of zero, return false if* that is the case.* This can be called when MMU is off so it must not access* any of the virtual mappings.
2923  链表项移动到头部
2924  否则
2926  删除链表项并重新初始化
2927  split_queue_len自减
2929  如果非How many objects scan_objects should scan and try to reclaim.* This is reset before every call, so it is safe for callees* to modify.先自减则退出
2932  spin_unlock_irqrestore( & split_queue_lock, flags)
2935  page等于list_entry - get the struct for this entry*@ptr: the &struct list_head pointer.*@type: the type of the struct this is embedded in.*@member: the name of the list_head within the struct.((void * )pos, structpage, mapping)
2936  如果非Return true if the page was successfully locked则转到:next
2939  如果非split_huge_page(page)则split自加
2941  lock_page - unlock a locked page*@page: the page* Unlocks the page and wakes up sleepers in ___wait_on_page_locked().* Also wakes sleepers in wait_on_page_writeback() because the wakeup* mechanism between PageLocked pages and PageWriteback pages is shared.
2942  :
2943  Perform a free_page(), also freeing any swap cache associated with* this page if it is the last user of the page.
2946  spin_lock_irqsave( & split_queue_lock, flags)
2947  加入二个链表项
2948  spin_unlock_irqrestore( & split_queue_lock, flags)
2954  如果非split链表为空则返回:SHRINK_STOP
2956  返回:split