函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\fork.c Create Date:2022-07-27 09:57:18
Last Modify:2020-03-17 11:04:53 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:set_max_threads

函数原型:static void set_max_threads(unsigned int max_threads_suggested)

返回类型:void

参数:

类型参数名称
unsigned intmax_threads_suggested
763  nr_pages等于totalram_pages()
769  如果ls64 - find last set bit in a 64-bit word*@x: the word to search* This is defined in a similar way as the libc and compiler builtin* ffsll, but returns the position of the most significant set bitls64 - find last set bit in a 64-bit word*@x: the word to search* This is defined in a similar way as the libc and compiler builtin* ffsll, but returns the position of the most significant set bit大于64则threads等于Maximum number of threads
771  否则threads等于div64_u64 - unsigned 64bit divide with 64bit divisor*@dividend: 64bit dividend*@divisor: 64bit divisor* This implementation is a modified version of the algorithm proposed* by the book 'Hacker's Delight'. The original source and full proof
775  如果threads大于max_threads_suggestedthreads等于max_threads_suggested
778  活跃进程限制数等于clamp_t - return a value clamped to a given range using a given type*@type: the type of variable to use*@val: current value*@lo: minimum allowable value*@hi: maximum allowable value* This macro does no typechecking and uses temporary variables of type(u64, threads, Minimum number of threads to boot the kernel, Maximum number of threads)
调用者
名称描述
fork_init进程创建机制初始化