函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:vmpressure_register_event() - Bind vmpressure notifications to an eventfd*@memcg: memcg that is interested in vmpressure notifications*@eventfd: eventfd context to link notifications with*@args: event arguments (pressure level threshold, optional mode)*

函数原型:int vmpressure_register_event(struct mem_cgroup *memcg, struct eventfd_ctx *eventfd, const char *args)

返回类型:int

参数:

类型参数名称
struct mem_cgroup *memcg
struct eventfd_ctx *eventfd
const char *args
365  vmpr等于Some nice accessors for the vmpressure.
367  mode等于VMPRESSURE_NO_PASSTHROUGH
371  ret等于0
373  spec_orig等于spec等于kstrndup - allocate space for and copy an existing string*@s: the string to duplicate*@max: read at most @max chars from @s*@gfp: the GFP mask used in the kmalloc() call when allocating memory* Note: Use kmemdup_nul() instead if the size is known exactly
374  如果非spec
375  ret等于负ENOMEM
376  转到:out
380  token等于分割字符串
381  ret等于match_string - matches given string in an array*@array: array of strings*@n: number of strings in the array or -1 for NULL terminated arrays*@string: string to match with* Return:* index of a @string in the @array if matches, or %-EINVAL otherwise.
382  如果ret小于0则转到:out
384  level等于ret
387  token等于分割字符串
388  如果token
389  ret等于match_string - matches given string in an array*@array: array of strings*@n: number of strings in the array or -1 for NULL terminated arrays*@string: string to match with* Return:* index of a @string in the @array if matches, or %-EINVAL otherwise.
390  如果ret小于0则转到:out
392  mode等于ret
395  ev等于分配内存并置零
396  如果非ev
397  ret等于负ENOMEM
398  转到:out
401  efd等于eventfd
402  level等于level
403  mode等于mode
405  mutex_lock( & Have to grab the lock on events traversal or modifications. )
406  添加链表项
407  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.
408  ret等于0
409  out :
410  释放内存
411  返回:ret