Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:read_page_owner

Proto:static ssize_t read_page_owner(struct file *file, char __user *buf, size_t count, loff_t *ppos)

Type:ssize_t

Parameter:

TypeParameterName
struct file *file
char __user *buf
size_tcount
loff_t *ppos
465  If Not static_branch_unlikely( & page_owner_inited) Then Return -EINVAL
468  page = NULL
469  pfn = min_low_pfn + ppos
472  When Not pfn_valid(pfn) && (pfn & MAX_ORDER_NR_PAGES - 1 ) != 0 cycle
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  When pfn < max_pfn cycle
483  If (pfn & MAX_ORDER_NR_PAGES - 1 ) == 0 && Not pfn_valid(pfn) Then
484  pfn += MAX_ORDER_NR_PAGES - 1
485  Continue
489  If Not pfn_valid_within(pfn) Then Continue
492  page = pfn_to_page(pfn)
498  Continue
501  page_ext = lookup_page_ext(page)
502  If Value for the false possibility is greater at compile time(!page_ext) Then Continue
509  If Not st_bit - Determine whether a bit is set*@nr: bit number to test*@addr: Address to start counting from Then Continue
516  If Not st_bit - Determine whether a bit is set*@nr: bit number to test*@addr: Address to start counting from Then Continue
519  page_owner = get_page_owner(page_ext)
525  If Not IS_ALIGNED(pfn, 1 << order) Then Continue
532  handle = READ_ONCE(handle)
533  If Not handle Then Continue
537  ppos = pfn - min_low_pfn + 1
539  Return print_page_owner(buf, count, pfn, page, page_owner, handle)
543  Return 0