函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:mm\page_alloc.c Create Date:2022-07-27 16:38:37
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:percpu_pagelist_fraction - changes the pcp->high for each zone on each* cpu. It is the fraction of total pages in each zone that a hot per cpu* pagelist can have before it gets flushed back to buddy allocator.

函数原型:int percpu_pagelist_fraction_sysctl_handler(struct ctl_table *table, int write, void __user *buffer, size_t *length, loff_t *ppos)

返回类型:int

参数:

类型参数名称
struct ctl_table *table
intwrite
void __user *buffer
size_t *length
loff_t *ppos
7999  mutex_lock( & prevent >1 _updater_ of zone percpu pageset ->high and ->batch fields )
8000  old_percpu_pagelist_fraction等于percpu_pagelist_fraction
8002  ret等于指定大小读sysctl整数向量
8003  如果非writeret小于0则转到:out
8007  如果percpu_pagelist_fractionpercpu_pagelist_fraction小于MIN_PERCPU_PAGELIST_FRACTION
8009  percpu_pagelist_fraction等于old_percpu_pagelist_fraction
8010  ret等于负EINVAL
8011  转到:out
8015  如果percpu_pagelist_fraction恒等于old_percpu_pagelist_fraction则转到:out
8018 zone循环如果非Returns true if a zone has memory
8018  否则__zone_pcp_update(zone)
8020  out :
8021  mutex_unlock - release the mutex*@lock: the mutex to be released* Unlock a mutex that has been locked by this task previously.* This function must not be used in interrupt context. Unlocking* of a not locked mutex is not allowed.
8022  返回:ret