函数逻辑报告 |
Source Code:mm\page_alloc.c |
Create Date:2022-07-27 16:35:21 |
Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
首页 | 函数Tree |
注解内核,赢得工具 | 下载SCCT | English |
函数名称:Return true if free base pages are above 'mark'. For high-order checks it* will return true of the order-0 watermark is reached and there is at least* one free page of a suitable size. Checking now avoids taking the zone lock
函数原型:bool __zone_watermark_ok(struct zone *z, unsigned int order, unsigned long mark, int classzone_idx, unsigned int alloc_flags, long free_pages)
返回类型:bool
参数:
类型 | 参数 | 名称 |
---|---|---|
struct zone * | z | |
unsigned int | order | |
unsigned long | mark | |
int | classzone_idx | |
unsigned int | alloc_flags | |
long | free_pages |
3396 | alloc_harder等于alloc_flags按位与ry to alloc harder 按位或Only MMU archs have async oom victim reclaim - aka oom_reaper so we* cannot assume a reduced access to memory reserves is sufficient for* !MMU的值 |
3399 | free_pages减等于1左移order位的值减1 |
3401 | 如果alloc_flags按位与__GFP_HIGH set 则min减等于min除2 |
3409 | 如果此条件成立可能性大(为编译器优化)(!alloc_harder)则 |
3410 | free_pages减等于nr_reserved_highatomic |
3411 | 否则 |
3427 | 如果非alloc_flags按位与allow allocations from CMA areas 的值则free_pages减等于zone_page_state(z, NR_FREE_CMA_PAGES) |
3436 | 如果free_pages小于等于min加关键性内存分配[classzone_idx]则返回:false |
3440 | 如果非order则返回:true |
3448 | 如果非nr_free则继续下一循环 |
3451 | 以mt小于MIGRATE_PCPTYPES循环 |
3452 | 如果非free_area_empty(area, mt)则返回:true |
3459 | 返回:true |
3462 | 如果alloc_harder且非链表为空则返回:true |
3466 | 返回:false |
名称 | 描述 |
---|---|
zone_watermark_ok | |
zone_watermark_fast | |
zone_watermark_ok_safe | |
should_reclaim_retry | Checks whether it makes sense to retry the reclaim to make a forward progress* for the given allocation request.* We give up when we either have tried MAX_RECLAIM_RETRIES in a row* without success, or when we couldn't even meet the watermark if we |
源代码转换工具 开放的插件接口 | X |
---|---|
支持:c/c++/esqlc/java Oracle/Informix/Mysql 插件可实现:逻辑报告 代码生成和批量转换代码 |