Function report |
Source Code:kernel\trace\ring_buffer.c |
Create Date:2022-07-28 11:53:31 |
| Last Modify:2020-03-17 19:30:04 | Copyright©Brick |
| home page | Tree |
| Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:__rb_allocate_pages
Proto:static int __rb_allocate_pages(long nr_pages, struct list_head *pages, int cpu)
Type:int
Parameter:
| Type | Parameter | Name |
|---|---|---|
| long | nr_pages | |
| struct list_head * | pages | |
| int | cpu |
| 1192 | bool user_thread = mm != NULL |
| 1203 | i = si_mem_available() |
| 1212 | mflags = GFP_KERNEL | __GFP_RETRY_MAYFAIL |
| 1223 | If user_thread Then set_current_oom_origin() |
| 1230 | If Not bpage Then Go to free_pages |
| 1235 | page = Allocate pages, preferring the node given as nid. When nid == NUMA_NO_NODE,* prefer the current CPU's closest node. Otherwise node must be valid and* online. |
| 1236 | If Not page Then Go to free_pages |
| 1238 | Actual data page = page_address(page) |
| 1239 | rb_init_page(Actual data page ) |
| 1241 | If user_thread && fatal_signal_pending(current process) Then Go to free_pages |
| 1244 | If user_thread Then clear_current_oom_origin() |
| 1247 | Return 0 |
| 1249 | free_pages : |
| 1254 | If user_thread Then clear_current_oom_origin() |
| 1257 | Return -ENOMEM |
| Name | Describe |
|---|---|
| rb_allocate_pages | |
| ring_buffer_resize | g_buffer_resize - resize the ring buffer*@buffer: the buffer to resize.*@size: the new size.*@cpu_id: the cpu buffer to resize* Minimum size is 2 * BUF_PAGE_SIZE.* Returns 0 on success and < 0 on failure. |
| 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 |