函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:shadow_lru_isolate

函数原型:static enum lru_status shadow_lru_isolate(struct list_head *item, struct list_lru_one *lru, spinlock_t *lru_lock, void *arg)__must_hold(lru_lock)

返回类型:enum lru_status

参数:

类型参数名称
struct list_head *item
struct list_lru_one *lru
spinlock_t *lru_lock
void *arg
491  node等于container_of - cast a member of a structure out to the containing structure*@ptr: the pointer to the member.*@type: the type of the container struct this is embedded in.*@member: the name of the member within the struct.(item, structxa_node, private_list)
492  XA_STATE() - Declare an XArray operation state.*@name: Name of this operation state (usually xas).*@array: Array to operate on.*@index: Initial index of interest.* Declare and initialise an xa_state on the stack.(xas, The array we belong to , 0)
508  mapping等于container_of - cast a member of a structure out to the containing structure*@ptr: the pointer to the member.*@type: the type of the container struct this is embedded in.*@member: the name of the member within the struct.(The array we belong to , structaddress_space, i_pages)
511  如果非xa_trylock( & i_pages)则
512  spin_unlock_irq(lru_lock)
513  ret等于m not freeable. May drop the lockinternally, but has to return locked.
514  转到:out
517  list_lru_isolate(lru, item)
518  __dec_lruvec_slab_state(node, WORKINGSET_NODES)
520  自旋锁解锁
527  如果WARN_ON_ONCE(!Value entry count )则转到:out_invalid
529  如果WARN_ON_ONCE(Total entry count != Value entry count )则转到:out_invalid
531  nrexceptional减等于Value entry count
532  xa_node等于Private
533  xa_offset等于Slot offset in parent
534  xa_shift等于Bits remaining in each slot The xarray is constructed out of a set of 'chunks' of pointers
535  xas_set_update() - Set up XArray operation state for a callback.*@xas: XArray operation state.*@update: Function to call when updating a node.* The XArray can notify a caller after it has updated an xa_node.
540  xas_store() - Store this entry in the XArray
541  __inc_lruvec_slab_state(node, WORKINGSET_NODERECLAIM)
543  out_invalid :
544  xa_unlock_irq( & i_pages)
545  ret等于m removed, but lock has beendropped and reacquired
546  out :
547  cond_resched()
548  spin_lock_irq(lru_lock)
549  返回:ret