Function report |
Source Code:mm\page_alloc.c |
Create Date:2022-07-28 15:05:10 |
| Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
| home page | Tree |
| Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:Allocate a page from the given zone. Use pcplists for order-0 allocations.
Proto:static inline struct page *rmqueue(struct zone *preferred_zone, struct zone *zone, unsigned int order, gfp_t gfp_flags, unsigned int alloc_flags, int migratetype)
Type:struct page
Parameter:
| Type | Parameter | Name |
|---|---|---|
| struct zone * | preferred_zone | |
| struct zone * | zone | |
| unsigned int | order | |
| gfp_t | gfp_flags | |
| unsigned int | alloc_flags | |
| int | migratetype |
| 3262 | If Value is more likely to compile time(order == 0) Then |
| 3265 | Go to out |
| 3272 | WARN_ON_ONCE((gfp_flags & __GFP_NOFAIL) && (order > 1)) |
| 3273 | spin_lock_irqsave( & Primarily protects free_area , flags) |
| 3275 | Do |
| 3276 | page = NULL |
| 3277 | If alloc_flags & ry to alloc harder Then |
| 3284 | When page && check_new_pages(page, order) cycle |
| 3285 | spin_unlock( & Primarily protects free_area ) |
| 3288 | __mod_zone_freepage_state(zone, - (1 << order), A cached value of the page's pageblock's migratetype, used when the page is* put on a pcplist) |
| 3291 | __count_zid_vm_events(PGALLOC, page_zonenum(page), 1 << order) |
| 3293 | local_irq_restore(flags) |
| 3295 | out : |
| 3303 | Return page |
| 3305 | failed : |
| 3306 | local_irq_restore(flags) |
| 3307 | Return NULL |
| Name | Describe |
|---|---|
| get_page_from_freelist | get_page_from_freelist goes through the zonelist trying to allocate* a page. |
| 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 |