Lines Matching +full:idle +full:- +full:halt

1 // SPDX-License-Identifier: GPL-2.0
3 * haltpoll.c - haltpoll idle governor
8 * the COPYING file in the top-level directory.
31 /* multiplication factor to grow per-cpu poll_limit_ns */
35 /* value in us to start growing per-cpu halt_poll_ns */
39 /* allow shrinking guest halt poll */
44 * haltpoll_select - selects the next idle state to enter
53 s64 latency_req = cpuidle_governor_latency_req(dev->cpu); in haltpoll_select()
55 if (!drv->state_count || latency_req == 0) { in haltpoll_select()
60 if (dev->poll_limit_ns == 0) in haltpoll_select()
64 if (dev->last_state_idx == 0) { in haltpoll_select()
65 /* Halt if no event occurred on poll window */ in haltpoll_select()
66 if (dev->poll_time_limit == true) in haltpoll_select()
75 /* Last state was halt: poll */ in haltpoll_select()
86 if (block_ns > dev->poll_limit_ns && block_ns <= guest_halt_poll_ns) { in adjust_poll_limit()
87 val = dev->poll_limit_ns * guest_halt_poll_grow; in adjust_poll_limit()
94 trace_guest_halt_poll_ns_grow(val, dev->poll_limit_ns); in adjust_poll_limit()
95 dev->poll_limit_ns = val; in adjust_poll_limit()
100 val = dev->poll_limit_ns; in adjust_poll_limit()
110 trace_guest_halt_poll_ns_shrink(val, dev->poll_limit_ns); in adjust_poll_limit()
111 dev->poll_limit_ns = val; in adjust_poll_limit()
116 * haltpoll_reflect - update variables and update poll time
122 dev->last_state_idx = index; in haltpoll_reflect()
125 adjust_poll_limit(dev, dev->last_residency_ns); in haltpoll_reflect()
129 * haltpoll_enable_device - scans a CPU's states and does setup
136 dev->poll_limit_ns = 0; in haltpoll_enable_device()