函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:fs\io_uring.c Create Date:2022-07-29 10:55:10
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:io_account_mem

函数原型:static int io_account_mem(struct user_struct *user, unsigned long nr_pages)

返回类型:int

参数:

类型参数名称
struct user_struct *user
unsigned longnr_pages
4638  page_limit等于rlimit(RLIMIT_MEMLOCK)右移PAGE_SHIFT determines the page size
4640  循环
4641  cur_pages等于atomic_long_read( & locked_vm)
4642  new_pages等于cur_pagesnr_pages
4643  如果new_pages大于page_limit则返回:负ENOMEM
4645 atomic_long_cmpxchg( & locked_vm, cur_pages, new_pages)不等于cur_pages循环
4648  返回:0
调用者
名称描述
io_sqe_buffer_register
io_uring_create