Function report |
Source Code:arch\x86\kernel\apm_32.c |
Create Date:2022-07-28 08:22:13 |
Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
home page | Tree |
Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:apm_cpu_idle
Proto:static int apm_cpu_idle(struct cpuidle_device *dev, struct cpuidle_driver *drv, int index)
Type:int
Parameter:
Type | Parameter | Name |
---|---|---|
struct cpuidle_device * | dev | |
struct cpuidle_driver * | drv | |
int | index |
908 | apm_idle_done = 0 |
912 | recalc : |
913 | task_cputime(current process, & utime, & stime) |
915 | use_apm_idle = 0 |
916 | Else if jiffies_since_last_check > idle_period Then |
919 | idle_percentage = nsecs_to_jiffies(stime - last_stime) |
920 | idle_percentage *= 100 |
923 | If forbid_idle Then use_apm_idle = 0 |
927 | last_jiffies = jiffies |
928 | last_stime = stime |
930 | bucket = IDLE_LEAKY_MAX |
932 | When Not need_resched() cycle |
933 | If use_apm_idle Then |
939 | apm_idle_done = 1 |
941 | If bucket Then |
942 | bucket = IDLE_LEAKY_MAX |
943 | Continue |
945 | Else if bucket Then |
946 | bucket-- |
947 | Continue |
949 | Break |
951 | apm_idle_done = 1 |
952 | Break |
953 | Default |
954 | Break |
958 | local_irq_disable() |
960 | If jiffies_since_last_check > idle_period Then Go to recalc |
964 | If apm_idle_done Then apm_do_busy - inform the BIOS the CPU is busy* Request that the BIOS brings the CPU back to full performance. |
967 | Return index |
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 |