Lines Matching defs:task
50 #include <linux/sched/task.h>
130 * task is moved into it.
198 /* Retrieve the cpuset for a task */
199 static inline struct cpuset *task_cs(struct task_struct *task)
201 return css_cs(task_css(task, cpuset_cgrp_id));
301 * task's cpuset pointer. See "The task_lock() exception", at the end of this
304 * A task must hold both locks to modify cpusets. If a task holds
306 * is the only task able to also acquire callback_lock and be able to
319 * If a task is only holding callback_lock, then it has read-only
323 * by other task, we use alloc_lock in the task_struct fields to protect
330 * Accessing a task's cpuset should be done in accordance with the
374 * Return in pmask the portion of a task's cpusets's cpus_allowed that
375 * are online and are capable of running the task. If none are found,
435 * update task's spread flag if cpuset's page/slab spread flag is set
953 struct task_struct *task;
957 while ((task = css_task_iter_next(&it))) {
958 dl_add_task_root_domain(task);
977 * if a task belongs to it.
1090 * @cs: the cpuset in which each task's cpus_allowed mask needs to be changed
1092 * Iterate through each task of @cs updating its cpus_allowed to the
1099 struct task_struct *task;
1102 while ((task = css_task_iter_next(&it))) {
1103 update_cpus_allowed(cs, task, cs->effective_cpus);
1680 * cpuset_change_task_nodemask - change task's mems_allowed and mempolicy
1681 * @tsk: the task to change
1682 * @newmems: new nodes that the task will be set
1685 * and rebind an eventual tasks' mempolicy. If the task is allocating in
1710 * @cs: the cpuset in which each task's mems_allowed mask needs to be changed
1712 * Iterate through each task of @cs updating its mems_allowed to the
1720 struct task_struct *task;
1737 while ((task = css_task_iter_next(&it))) {
1741 cpuset_change_task_nodemask(task, &newmems);
1743 mm = get_task_mm(task);
1828 * cpusets mems_allowed, and for each task in the cpuset,
1829 * update mems_allowed and rebind task's mempolicy and any vma
1921 * @cs: the cpuset in which each task's spread flags needs to be changed
1923 * Iterate through each task of @cs updating its spread flags. As this
1930 struct task_struct *task;
1933 while ((task = css_task_iter_next(&it))) {
1934 cpuset_update_task_spread_flag(cs, task);
2196 struct task_struct *task;
2211 cgroup_taskset_for_each(task, css, tset)
2213 ret = task_can_attach(task, cs->effective_cpus);
2217 ret = security_task_setscheduler(task);
2256 struct task_struct *task;
2269 cgroup_taskset_for_each(task, css, tset)
2272 guarantee_online_cpus(task, cpus_attach);
2274 cpumask_copy(cpus_attach, task_cpu_possible_mask(task));
2280 WARN_ON_ONCE(update_cpus_allowed(cs, task, cpus_attach));
2282 cpuset_change_task_nodemask(task, &cpuset_attach_nodemask_to);
2283 cpuset_update_task_spread_flag(cs, task);
2300 * here, except if this task is being moved
2860 * refuse to clone the configuration - thereby refusing the task to
2954 * Make sure the new task conform to the current state of its parent,
2956 * state from the parent and before it sits on the cgroup's task list.
2958 static void cpuset_fork(struct task_struct *task)
2961 if (task_css_is_root(task, cpuset_cgrp_id)) {
2965 task->mems_allowed = current->mems_allowed;
3132 * We have raced with task attaching. We wait until attaching
3133 * is finished, so we won't attach a task to an empty cpuset.
3517 * unless the task has been OOM killed.
3538 * in_interrupt - any node ok (current task context irrelevant)
3567 if (current->flags & PF_EXITING) { /* Let dying task have memory */
3587 * If a task is marked PF_SPREAD_PAGE or PF_SPREAD_SLAB (as for
3600 * only set nodes in task->mems_allowed that are online. So it
3637 * @tsk1: pointer to task_struct of some task.
3638 * @tsk2: pointer to task_struct of some other task.
3642 * one of the task's memory usage might impact the memory available
3685 * This represents the rate at which some task in the cpuset
3694 * (direct) page reclaim by any task attached to the cpuset.
3745 /* Display task mems_allowed in /proc/<pid>/status file. */
3746 void cpuset_task_status_allowed(struct seq_file *m, struct task_struct *task)
3748 seq_printf(m, "Mems_allowed:\t%*pb\n", nodemask_pr_args(&task->mems_allowed));
3749 seq_printf(m, "Mems_allowed_list:\t%*pbl\n", nodemask_pr_args(&task->mems_allowed));