Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:mm\workingset.c Create Date:2022-07-28 14:33:22
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:shadow_lru_isolate

Proto: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)

Type:enum lru_status

Parameter:

TypeParameterName
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  If Not xa_trylock( & i_pages) Then
512  spin_unlock_irq(lru_lock)
513  ret = m not freeable. May drop the lockinternally, but has to return locked.
514  Go to out
517  list_lru_isolate(lru, item)
518  __dec_lruvec_slab_state(node, WORKINGSET_NODES)
520  spin_unlock(lru_lock)
527  If WARN_ON_ONCE(!Value entry count ) Then Go to out_invalid
529  If WARN_ON_ONCE(Total entry count != Value entry count ) Then Go to 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  Return ret