Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:memory_high_write

Proto:static ssize_t memory_high_write(struct kernfs_open_file *of, char *buf, size_t nbytes, loff_t off)

Type:ssize_t

Parameter:

TypeParameterName
struct kernfs_open_file *of
char *buf
size_tnbytes
loff_toff
5938  memcg = mem_cgroup_from_css(of_css(of))
5939  nr_retries = MEM_CGROUP_RECLAIM_RETRIES
5940  bool drained = false
5944  buf = strstrip(buf)
5945  err = page_counter_memparse - memparse() for page counter limits*@buf: string to parse*@max: string meaning maximum possible value*@nr_pages: returns the result in number of pages* Returns -EINVAL, or 0 and @nr_pages on success. @nr_pages will be
5946  If err Then Return err
5949  Upper bound of normal memory consumption range = high
5951  cycle
5952  nr_pages = page_counter_read( & Accounted resources )
5955  If nr_pages <= high Then Break
5958  If signal_pending(current process) Then Break
5961  If Not drained Then
5963  drained = true
5964  Continue
5967  reclaimed = try_to_free_mem_cgroup_pages(memcg, nr_pages - high, GFP_KERNEL, true)
5970  If Not reclaimed && Not nr_retries -- Then Break
5974  Return nbytes