Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:mm\page_alloc.c Create Date:2022-07-28 15:08:25
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name: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.

Proto:int percpu_pagelist_fraction_sysctl_handler(struct ctl_table *table, int write, void __user *buffer, size_t *length, loff_t *ppos)

Type:int

Parameter:

TypeParameterName
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 = read a vector of integers with min/max values
8003  If Not write || ret < 0 Then Go to out
8007  If percpu_pagelist_fraction && percpu_pagelist_fraction < MIN_PERCPU_PAGELIST_FRACTION Then
8009  percpu_pagelist_fraction = old_percpu_pagelist_fraction
8010  ret = -EINVAL
8011  Go to out
8015  If percpu_pagelist_fraction == old_percpu_pagelist_fraction Then Go to out
8018  When zone cycle If Not Returns true if a zone has memory Then
8018  Else __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  Return ret