Lines Matching refs:tasks

11  * When CPU, memory and IO are contended, tasks experience delays that
30 * In the SOME state of a given resource, one or more tasks are
32 * perform work, but the CPU may still be executing other tasks.
34 * In the FULL state of a given resource, all non-idle tasks are
48 * FULL means all non-idle tasks in the cgroup are delayed on the CPU
62 * The more tasks and available CPUs there are, the more work can be
65 * tasks and CPUs.
67 * Consider a scenario where 257 number crunching tasks are trying to
75 * Conversely, consider a scenario of 4 tasks and 4 CPUs where at any
76 * given time *one* of the tasks is delayed due to a lack of memory.
83 * we have to base our calculation on the number of non-idle tasks in
86 * delayed tasks to possible threads, and FULL is the share of possible
99 * For the 1 out of 4 memory-delayed tasks, this yields:
221 static bool test_state(unsigned int *tasks, enum psi_states state, bool oncpu)
225 return unlikely(tasks[NR_IOWAIT]);
227 return unlikely(tasks[NR_IOWAIT] && !tasks[NR_RUNNING]);
229 return unlikely(tasks[NR_MEMSTALL]);
231 return unlikely(tasks[NR_MEMSTALL] &&
232 tasks[NR_RUNNING] == tasks[NR_MEMSTALL_RUNNING]);
234 return unlikely(tasks[NR_RUNNING] > oncpu);
236 return unlikely(tasks[NR_RUNNING] && !oncpu);
238 return tasks[NR_IOWAIT] || tasks[NR_MEMSTALL] ||
239 tasks[NR_RUNNING];
251 unsigned int tasks[NR_PSI_TASK_COUNTS];
267 memcpy(tasks, groupc->tasks, sizeof(groupc->tasks));
305 reschedule = tasks[NR_RUNNING] +
306 tasks[NR_IOWAIT] +
307 tasks[NR_MEMSTALL] > 1;
783 * assess the aggregate resource states this CPU's tasks
812 if (groupc->tasks[t]) {
813 groupc->tasks[t]--;
815 printk_deferred(KERN_ERR "psi: task underflow! cpu=%d t=%d tasks=[%u %u %u %u] clear=%x set=%x\n",
816 cpu, t, groupc->tasks[0],
817 groupc->tasks[1], groupc->tasks[2],
818 groupc->tasks[3], clear, set);
825 groupc->tasks[t]++;
845 if (test_state(groupc->tasks, s, state_mask & PSI_ONCPU))
851 * when there are no other working tasks, but also when
981 * any other differences between the two tasks (e.g. prev goes
1196 * stop percpu tasks accounting in each psi_group_cpu,
1205 * to get correct state mask from test_state() loop on tasks[],