Function report |
Source Code:kernel\power\energy_model.c |
Create Date:2022-07-28 10:04:45 |
| Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
| home page | Tree |
| Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:em_create_pd
Proto:static struct em_perf_domain *em_create_pd(cpumask_t *span, int nr_states, struct em_data_callback *cb)
Type:struct em_perf_domain
Parameter:
| Type | Parameter | Name |
|---|---|---|
| cpumask_t * | span | |
| int | nr_states | |
| struct em_data_callback * | cb |
| 84 | prev_opp_eff = ULONG_MAX |
| 85 | prev_freq = 0 |
| 91 | If Not active_power Then Return NULL |
| 94 | pd = kzalloc - allocate memory. The memory is set to zero.*@size: how many bytes of memory are required.*@flags: the type of memory to allocate (see kmalloc). |
| 95 | If Not pd Then Return NULL |
| 98 | table = kcalloc - allocate memory for an array. The memory is set to zero.*@n: number of elements.*@size: element size.*@flags: the type of memory to allocate (see kmalloc). |
| 109 | ret = active_power( & power, & freq, cpu) |
| 110 | If ret Then |
| 112 | Go to free_cs_table |
| 121 | Go to free_cs_table |
| 128 | If Not power || power > EM_CPU_MAX_POWER Then |
| 130 | Go to free_cs_table |
| 143 | If opp_eff >= prev_opp_eff Then pr_warn("pd%d: hertz/watts ratio non-monotonically decreasing: em_cap_state %d >= em_cap_state%d\n", cpu, i, i - 1) |
| 146 | prev_opp_eff = opp_eff |
| 157 | nr_cap_states = nr_states |
| 160 | em_debug_create_pd(pd, cpu) |
| 162 | Return pd |
| 164 | free_cs_table : |
| 166 | free_pd : |
| 169 | Return NULL |
| Name | Describe |
|---|---|
| em_register_perf_domain | m_register_perf_domain() - Register the Energy Model of a performance domain*@span : Mask of CPUs in the performance domain*@nr_states : Number of capacity states to register*@cb : Callback functions providing the data of the Energy Model* Create Energy |
| 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 |