Lines Matching refs:tasks
217 static bool test_state(unsigned int *tasks, enum psi_states state, bool oncpu) in test_state() argument
221 return unlikely(tasks[NR_IOWAIT]); in test_state()
223 return unlikely(tasks[NR_IOWAIT] && !tasks[NR_RUNNING]); in test_state()
225 return unlikely(tasks[NR_MEMSTALL]); in test_state()
227 return unlikely(tasks[NR_MEMSTALL] && in test_state()
228 tasks[NR_RUNNING] == tasks[NR_MEMSTALL_RUNNING]); in test_state()
230 return unlikely(tasks[NR_RUNNING] > oncpu); in test_state()
232 return unlikely(tasks[NR_RUNNING] && !oncpu); in test_state()
234 return tasks[NR_IOWAIT] || tasks[NR_MEMSTALL] || in test_state()
235 tasks[NR_RUNNING]; in test_state()
247 unsigned int tasks[NR_PSI_TASK_COUNTS]; in get_recent_times() local
263 memcpy(tasks, groupc->tasks, sizeof(groupc->tasks)); in get_recent_times()
301 reschedule = tasks[NR_RUNNING] + in get_recent_times()
302 tasks[NR_IOWAIT] + in get_recent_times()
303 tasks[NR_MEMSTALL] > 1; in get_recent_times()
800 if (groupc->tasks[t]) { in psi_group_change()
801 groupc->tasks[t]--; in psi_group_change()
804 cpu, t, groupc->tasks[0], in psi_group_change()
805 groupc->tasks[1], groupc->tasks[2], in psi_group_change()
806 groupc->tasks[3], clear, set); in psi_group_change()
813 groupc->tasks[t]++; in psi_group_change()
833 if (test_state(groupc->tasks, s, state_mask & PSI_ONCPU)) in psi_group_change()