函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:read_page_owner

函数原型:static ssize_t read_page_owner(struct file *file, char __user *buf, size_t count, loff_t *ppos)

返回类型:ssize_t

参数:

类型参数名称
struct file *file
char __user *buf
size_tcount
loff_t *ppos
465  如果非static_branch_unlikely( & page_owner_inited)则返回:负EINVAL
468  page = NULL
469  pfn等于min_low_pfnppos
472  当非pfn_valid(pfn)且pfn按位与MAX_ORDER_NR_PAGES减1的值不等于0循环
473  pfn自加
475  Spill all the per-cpu pages from all CPUs back into the buddy allocator.* When zone parameter is non-NULL, spill just the single zone's pages.* Note that this can be extremely slow as the draining happens in a workqueue.
478 pfn小于max_pfn循环
483  如果pfn按位与MAX_ORDER_NR_PAGES减1的值恒等于0且非pfn_valid(pfn)则
484  pfn加等于MAX_ORDER_NR_PAGES减1
485  继续下一循环
489  如果非pfn_valid_within(pfn)则继续下一循环
492  page等于pfn_to_page(pfn)
496  如果freepage_order小于Free memory management - zoned buddy allocator. pfn加等于1UL左移freepage_order位的值减1
498  继续下一循环
501  page_ext等于lookup_page_ext(page)
502  如果此条件成立可能性小(为编译器优化)(!page_ext)则继续下一循环
509  如果非st_bit - Determine whether a bit is set*@nr: bit number to test*@addr: Address to start counting from则继续下一循环
516  如果非st_bit - Determine whether a bit is set*@nr: bit number to test*@addr: Address to start counting from则继续下一循环
519  page_owner等于get_page_owner(page_ext)
525  如果非IS_ALIGNED(pfn, 1 << order)则继续下一循环
532  handle等于READ_ONCE(handle)
533  如果非handle则继续下一循环
537  ppos等于pfnmin_low_pfn加1
539  返回:print_page_owner(buf, count, pfn, page, page_owner, handle)
543  返回:0