函数逻辑报告 |
Source Code:mm\compaction.c |
Create Date:2022-07-27 15:55:23 |
Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
首页 | 函数Tree |
注解内核,赢得工具 | 下载SCCT | English |
函数名称:Isolate free pages onto a private freelist. If @strict is true, will abort* returning 0 on any invalid PFNs or non-free pages inside of the pageblock* (even though it may still end up isolating some pages).
函数原型:static unsigned long isolate_freepages_block(struct compact_control *cc, unsigned long *start_pfn, unsigned long end_pfn, struct list_head *freelist, unsigned int stride, bool strict)
返回类型:unsigned long
参数:
类型 | 参数 | 名称 |
---|---|---|
struct compact_control * | cc | |
unsigned long * | start_pfn | |
unsigned long | end_pfn | |
struct list_head * | freelist | |
unsigned int | stride | |
bool | strict |
542 | nr_scanned等于0, total_isolated等于0 |
544 | flags等于0 |
545 | bool locked = false |
553 | cursor等于pfn_to_page(blockpfn) |
570 | nr_scanned自加 |
571 | 如果非pfn_valid_within(blockpfn)则转到:isolate_fail |
580 | 如果PageCompound(page)则 |
581 | order等于compound_order(page) |
587 | 转到:isolate_fail |
590 | 如果非PageBuddy() indicates that the page is free and in the buddy system* (see mm/page_alloc.c).则转到:isolate_fail |
600 | 如果非locked则 |
611 | isolated等于__isolate_free_page(page, order) |
614 | set_page_private(page, order) |
616 | total_isolated加等于isolated |
618 | 添加链表项 |
627 | 继续下一循环 |
629 | isolate_fail : |
632 | 否则继续下一循环 |
637 | 如果locked则spin_unlock_irqrestore( & 自旋锁, flags) |
644 | 如果此条件成立可能性小(为编译器优化)(blockpfn > end_pfn)则blockpfn等于end_pfn |
658 | 如果strict且blockpfn小于end_pfn则total_isolated等于0 |
661 | total_free_scanned加等于nr_scanned |
664 | 返回:total_isolated |
名称 | 描述 |
---|---|
isolate_freepages_range | solate_freepages_range() - isolate free pages |
源代码转换工具 开放的插件接口 | X |
---|---|
支持:c/c++/esqlc/java Oracle/Informix/Mysql 插件可实现:逻辑报告 代码生成和批量转换代码 |