Function report |
Source Code:mm\page_alloc.c |
Create Date:2022-07-28 15:05:14 |
| Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
| home page | Tree |
| Annotation kernel can get tool activity | Download SCCT | Chinese |
Name: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
Proto:bool __zone_watermark_ok(struct zone *z, unsigned int order, unsigned long mark, int classzone_idx, unsigned int alloc_flags, long free_pages)
Type:bool
Parameter:
| Type | Parameter | Name |
|---|---|---|
| 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 | If alloc_flags & __GFP_HIGH set Then min -= min / 2 |
| 3409 | If Value is more likely to compile time(!alloc_harder) Then |
| 3410 | free_pages -= nr_reserved_highatomic |
| 3411 | Else |
| 3427 | If Not (alloc_flags & allow allocations from CMA areas ) Then free_pages -= zone_page_state(z, NR_FREE_CMA_PAGES) |
| 3440 | If Not order Then Return true |
| 3444 | When o < Free memory management - zoned buddy allocator. cycle |
| 3448 | If Not nr_free Then Continue |
| 3451 | When mt < MIGRATE_PCPTYPES cycle |
| 3452 | If Not free_area_empty(area, mt) Then Return true |
| 3457 | If alloc_flags & allow allocations from CMA areas && Not free_area_empty(area, MIGRATE_CMA) Then |
| 3459 | Return true |
| 3462 | If alloc_harder && Not list_empty - tests whether a list is empty*@head: the list to test. Then Return true |
| 3466 | Return false |
| Name | Describe |
|---|---|
| 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 |
| Source code conversion tool public plug-in interface | X |
|---|---|
| Support c/c++/esqlc/java Oracle/Informix/Mysql Plug-in can realize: logical Report Code generation and batch code conversion |