Function report |
Source Code:mm\vmalloc.c |
Create Date:2022-07-28 14:59:18 |
| Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
| home page | Tree |
| Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:w_vmap_block - allocates new vmap_block and occupies 2^order pages in this* block
Proto:static void *new_vmap_block(unsigned int order, gfp_t gfp_mask)
Type:void
Parameter:
| Type | Parameter | Name |
|---|---|---|
| unsigned int | order | |
| gfp_t | gfp_mask |
| 1503 | If Value for the false possibility is greater at compile time(!vb) Then Return ERR_PTR( - ENOMEM) |
| 1506 | va = Allocate a region of KVA of the specified size and alignment, within the* vstart and vend. |
| 1514 | err = Load up this CPU's radix_tree_node buffer with sufficient objects to* ensure that the addition of a single element in the tree cannot fail |
| 1521 | vaddr = vmap_block_vaddr(va_start, 0) |
| 1522 | Process spin lock initialization( & lock) |
| 1525 | BUG_ON(VMAP_BBMAP_BITS <= (1UL << order)) |
| 1526 | free = VMAP_BBMAP_BITS - (1UL << order) |
| 1527 | dirty = 0 |
| 1528 | dirty_min = VMAP_BBMAP_BITS |
| 1529 | < dirty range = 0 |
| 1534 | err = __radix_tree_insert - insert into a radix tree*@root: radix tree root*@index: index key*@item: item to insert* Insert an item into the radix tree at position @index. |
| 1537 | radix_tree_preload_end() |
| 1539 | vbq = Must be an lvalue. Since @var must be a simple identifier,* we force a syntax error here if it isn't.(Queue of free and dirty vmap blocks, for allocation and flushing purposes ) |
| 1542 | spin_unlock( & lock) |
| 1543 | The weird & is necessary because sparse considers (void)(var) to be* a direct dereference of percpu variable (var).(Queue of free and dirty vmap blocks, for allocation and flushing purposes ) |
| 1545 | Return vaddr |
| Name | Describe |
|---|---|
| vb_alloc |
| 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 |