Function report |
Source Code:mm\percpu-stats.c |
Create Date:2022-07-28 16:36:03 |
| Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
| home page | Tree |
| Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:Prints out chunk state. Fragmentation is considered between* the beginning of the chunk to the last allocation.* All statistics are in bytes unless stated otherwise.
Proto:static void chunk_map_stats(struct seq_file *m, struct pcpu_chunk *chunk, int *buffer)
Type:void
Parameter:
| Type | Parameter | Name |
|---|---|---|
| struct seq_file * | m | |
| struct pcpu_chunk * | chunk | |
| int * | buffer |
| 60 | cur_min_alloc = 0 , cur_med_alloc = 0 , cur_max_alloc = 0 |
| 62 | alloc_sizes = buffer |
| 72 | last_alloc = If st_bit - Determine whether a bit is set*@nr: bit number to test*@addr: Address to start counting from Then last_alloc + 1 Else 0 |
| 75 | as_len = 0 |
| 76 | start = the overlap with the previous region to have a page aligned base_addr / PCPU_MIN_ALLOC_SIZE |
| 87 | When start < last_alloc cycle |
| 91 | alloc_sizes[as_len] = 1 |
| 92 | Else |
| 95 | alloc_sizes[as_len] = -1 |
| 98 | alloc_sizes[as_len++] *= (end - start) * PCPU_MIN_ALLOC_SIZE |
| 107 | If as_len > 0 Then |
| 108 | sort(alloc_sizes, as_len, sizeof(int), cmpint, NULL) |
| 116 | cur_min_alloc = alloc_sizes[i] |
| 117 | cur_med_alloc = alloc_sizes[(i + as_len - 1) / 2] |
| 118 | cur_max_alloc = alloc_sizes[as_len - 1] |
| 122 | P("max_alloc_size", max_alloc_size) |
| 123 | P("empty_pop_pages", # of empty populated pages ) |
| 124 | P("first_bit", lock position of first free ) |
| 125 | P("free_bytes", free bytes in the chunk ) |
| 126 | P("contig_bytes", contig hint for block * PCPU_MIN_ALLOC_SIZE) |
| 129 | P("cur_min_alloc", cur_min_alloc) |
| 130 | P("cur_med_alloc", cur_med_alloc) |
| 131 | P("cur_max_alloc", cur_max_alloc) |
| Name | Describe |
|---|---|
| percpu_stats_show |
| 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 |