Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\fork.c Create Date:2022-07-28 08:57:37
Last Modify:2020-03-17 11:04:53 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:account_kernel_stack

Proto:static void account_kernel_stack(struct task_struct *tsk, int account)

Type:void

Parameter:

TypeParameterName
struct task_struct *tsk
intaccount
375  stack = task_stack_page(tsk)
376  vm = task_stack_vm_area(tsk)
378  BUILD_BUG_ON - break compile if a condition is true(IS_ENABLED(CONFIG_FOO) evaluates to 1 if CONFIG_FOO is set to 'y' or 'm',* 0 otherwise.(CONFIG_VMAP_STACK) && PAGE_SIZE % 1024 != 0)
380  If vm Then
383  BUG_ON(nr_pages != THREAD_SIZE / PAGE_SIZE)
385  When i < THREAD_SIZE / PAGE_SIZE cycle
390  Else
395  first_page = virt_to_page(kaddr) returns a valid pointer if and only if* virt_addr_valid(kaddr) returns true.(stack)
397  mod_zone_page_state(page_zone(first_page), NR_KERNEL_STACK_KB, THREAD_SIZE / 1024 * account)
400  mod_memcg_page_state(first_page, MEMCG_KERNEL_STACK_KB, account * (THREAD_SIZE / 1024))
Caller
NameDescribe
release_task_stack
dup_task_structReplication process and set stack