Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:io_account_mem

Proto:static int io_account_mem(struct user_struct *user, unsigned long nr_pages)

Type:int

Parameter:

TypeParameterName
struct user_struct *user
unsigned longnr_pages
4638  page_limit = rlimit(RLIMIT_MEMLOCK) >> PAGE_SHIFT determines the page size
4640  Do
4641  cur_pages = atomic_long_read( & locked_vm)
4642  new_pages = cur_pages + nr_pages
4643  If new_pages > page_limit Then Return -ENOMEM
4645  When atomic_long_cmpxchg( & locked_vm, cur_pages, new_pages) != cur_pages cycle
4648  Return 0
Caller
NameDescribe
io_sqe_buffer_register
io_uring_create