Lines Matching refs:tsk
384 static void guarantee_online_cpus(struct task_struct *tsk, struct cpumask *pmask)
386 const struct cpumask *possible_mask = task_cpu_possible_mask(tsk);
394 cs = task_cs(tsk);
439 static void cpuset_update_task_spread_flag(struct cpuset *cs, struct task_struct *tsk)
442 task_set_spread_page(tsk);
444 task_clear_spread_page(tsk);
448 task_set_spread_slab(tsk);
450 task_clear_spread_slab(tsk);
1681 * @tsk: the task to change
1684 * We use the mems_allowed_seq seqlock to safely update both tsk->mems_allowed
1689 static void cpuset_change_task_nodemask(struct task_struct *tsk, nodemask_t *newmems)
1691 task_lock(tsk);
1694 write_seqcount_begin(&tsk->mems_allowed_seq);
1696 nodes_or(tsk->mems_allowed, tsk->mems_allowed, *newmems);
1697 mpol_rebind_task(tsk, newmems);
1698 tsk->mems_allowed = *newmems;
1700 write_seqcount_end(&tsk->mems_allowed_seq);
1703 task_unlock(tsk);
3384 * @tsk: pointer to task_struct from which to obtain cpuset->cpus_allowed.
3388 * attached to the specified @tsk. Guaranteed to return some non-empty
3393 void cpuset_cpus_allowed(struct task_struct *tsk, struct cpumask *pmask)
3399 guarantee_online_cpus(tsk, pmask);
3406 * @tsk: pointer to task_struct with which the scheduler is struggling
3409 * tsk->cpus_allowed, we fall back to task_cs(tsk)->cpus_allowed. In legacy
3410 * mode however, this value is the same as task_cs(tsk)->effective_cpus,
3416 void cpuset_cpus_allowed_fallback(struct task_struct *tsk)
3418 const struct cpumask *possible_mask = task_cpu_possible_mask(tsk);
3422 cs_mask = task_cs(tsk)->cpus_allowed;
3427 do_set_cpus_allowed(tsk, cs_mask);
3432 * We own tsk->cpus_allowed, nobody can change it under us.
3436 * the wrong tsk->cpus_allowed. However, both cases imply the
3457 * @tsk: pointer to task_struct from which to obtain cpuset->mems_allowed.
3460 * attached to the specified @tsk. Guaranteed to return some non-empty
3465 nodemask_t cpuset_mems_allowed(struct task_struct *tsk)
3472 guarantee_online_mems(task_cs(tsk), &mask);
3709 * - No need to task_lock(tsk) on this tsk->cpuset reference, as it
3710 * doesn't really matter if tsk->cpuset changes after we read it,
3714 int proc_cpuset_show(struct seq_file *m, struct pid_namespace *ns, struct pid *pid, struct task_struct *tsk)
3726 css = task_get_css(tsk, cpuset_cgrp_id);