Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:mm\memfd.c Create Date:2022-07-28 16:37:51
Last Modify:2022-05-20 10:27:46 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:memfd_tag_pins

Proto:static void memfd_tag_pins(struct xa_state *xas)

Type:void

Parameter:

TypeParameterName
struct xa_state *xas
34  tagged = 0
36  lru_add_drain()
38  xas_lock_irq(xas)
40  If xa_is_value() - Determine if an entry is a value.*@entry: XArray entry.* Context: Any context.* Return: True if the entry is a value, false if it is a pointer. Then Continue
42  page = find_subpage(page, xa_index)
43  If page_count(page) - page_mapcount(page) > 1 Then xas_set_mark() - Sets the mark on this entry and its parents.*@xas: XArray operation state.*@mark: Mark number.* Sets the specified mark on this entry, and walks up the tree setting it* on all the ancestor entries
46  If ++tagged % XA_CHECK_SCHED Then Continue
49  xas_pause() - Pause a walk to drop a lock.*@xas: XArray operation state.* Some users need to pause a walk and drop the lock they're holding in* order to yield to a higher priority thread or carry out an operation* on an entry
50  xas_unlock_irq(xas)
51  cond_resched()
52  xas_lock_irq(xas)
54  xas_unlock_irq(xas)
Caller
NameDescribe
memfd_wait_for_pinsSetting SEAL_WRITE requires us to verify there's no pending writer. However,* via get_user_pages(), drivers might have some pending I/O without any active* user-space mappings (eg., direct-IO, AIO). Therefore, we look at all pages