Lines Matching full:tasks
10 * When CPU, memory and IO are contended, tasks experience delays that
29 * In the SOME state of a given resource, one or more tasks are
31 * perform work, but the CPU may still be executing other tasks.
33 * In the FULL state of a given resource, all non-idle tasks are
38 * system level, but exist at the cgroup level, means all non-idle tasks
55 * The more tasks and available CPUs there are, the more work can be
58 * tasks and CPUs.
60 * Consider a scenario where 257 number crunching tasks are trying to
68 * Conversely, consider a scenario of 4 tasks and 4 CPUs where at any
69 * given time *one* of the tasks is delayed due to a lack of memory.
76 * we have to base our calculation on the number of non-idle tasks in
79 * delayed tasks to possible threads, and FULL is the share of possible
92 * For the 1 out of 4 memory-delayed tasks, this yields:
226 static bool test_state(unsigned int *tasks, enum psi_states state) in test_state() argument
230 return unlikely(tasks[NR_IOWAIT]); in test_state()
232 return unlikely(tasks[NR_IOWAIT] && !tasks[NR_RUNNING]); in test_state()
234 return unlikely(tasks[NR_MEMSTALL]); in test_state()
236 return unlikely(tasks[NR_MEMSTALL] && !tasks[NR_RUNNING]); in test_state()
238 return unlikely(tasks[NR_RUNNING] > tasks[NR_ONCPU]); in test_state()
240 return unlikely(tasks[NR_RUNNING] && !tasks[NR_ONCPU]); in test_state()
242 return tasks[NR_IOWAIT] || tasks[NR_MEMSTALL] || in test_state()
243 tasks[NR_RUNNING]; in test_state()
697 * tasks have been in since the last change, and account any in psi_group_change()
710 if (groupc->tasks[t]) { in psi_group_change()
711 groupc->tasks[t]--; in psi_group_change()
713 … printk_deferred(KERN_ERR "psi: task underflow! cpu=%d t=%d tasks=[%u %u %u %u] clear=%x set=%x\n", in psi_group_change()
714 cpu, t, groupc->tasks[0], in psi_group_change()
715 groupc->tasks[1], groupc->tasks[2], in psi_group_change()
716 groupc->tasks[3], clear, set); in psi_group_change()
723 groupc->tasks[t]++; in psi_group_change()
727 if (test_state(groupc->tasks, s)) in psi_group_change()
733 * when there are no other working tasks, but also when in psi_group_change()
739 if (unlikely(groupc->tasks[NR_ONCPU] && cpu_curr(cpu)->in_memstall)) in psi_group_change()
834 * When switching between tasks that have an identical in psi_task_switch()
835 * runtime state, the cgroup that contains both tasks in psi_task_switch()
836 * runtime state, the cgroup that contains both tasks in psi_task_switch()
844 per_cpu_ptr(group->pcpu, cpu)->tasks[NR_ONCPU]) { in psi_task_switch()