函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:alloon_page_list_dequeue() - removes pages from balloon's page list and* returns a list of the pages.*@b_dev_info: balloon device decriptor where we will grab a page from.*@pages: pointer to the list of pages that would be returned to the caller.

函数原型:size_t balloon_page_list_dequeue(struct balloon_dev_info *b_dev_info, struct list_head *pages, size_t n_req_pages)

返回类型:size_t

参数:

类型参数名称
struct balloon_dev_info *b_dev_info
struct list_head *pages
size_tn_req_pages
81  n_pages等于0
83  spin_lock_irqsave( & Protection to pages list , flags)
85  如果n_pages恒等于n_req_pages退出
93  如果非Return true if the page was successfully locked则继续下一循环
96  如果IS_ENABLED(CONFIG_FOO) evaluates to 1 if CONFIG_FOO is set to 'y' or 'm',* 0 otherwise.(CONFIG_BALLOON_COMPACTION)且PageIsolated(page)则
99  lock_page - unlock a locked page*@page: the page* Unlocks the page and wakes up sleepers in ___wait_on_page_locked().* Also wakes sleepers in wait_on_page_writeback() because the wakeup* mechanism between PageLocked pages and PageWriteback pages is shared.
100  继续下一循环
102  balloon_page_delete(page)
103  __count_vm_event(BALLOON_DEFLATE)
104  添加链表项
105  lock_page - unlock a locked page*@page: the page* Unlocks the page and wakes up sleepers in ___wait_on_page_locked().* Also wakes sleepers in wait_on_page_writeback() because the wakeup* mechanism between PageLocked pages and PageWriteback pages is shared.
106  n_pages自加
108  spin_unlock_irqrestore( & Protection to pages list , flags)
110  返回:n_pages
调用者
名称描述
balloon_page_dequeuealloon_page_dequeue - removes a page from balloon's page list and returns* its address to allow the driver to release the page