Lines Matching refs:tsk
98 void get_kthread_comm(char *buf, size_t buf_size, struct task_struct *tsk) in get_kthread_comm() argument
100 struct kthread *kthread = to_kthread(tsk); in get_kthread_comm()
103 __get_task_comm(buf, buf_size, tsk); in get_kthread_comm()
392 int tsk_fork_get_node(struct task_struct *tsk) in tsk_fork_get_node() argument
395 if (tsk == kthreadd_task) in tsk_fork_get_node()
396 return tsk->pref_node_fork; in tsk_fork_get_node()
732 struct task_struct *tsk = current; in kthreadd() local
735 set_task_comm(tsk, "kthreadd"); in kthreadd()
736 ignore_signals(tsk); in kthreadd()
737 set_cpus_allowed_ptr(tsk, housekeeping_cpumask(HK_TYPE_KTHREAD)); in kthreadd()
1420 struct task_struct *tsk = current; in kthread_use_mm() local
1422 WARN_ON_ONCE(!(tsk->flags & PF_KTHREAD)); in kthread_use_mm()
1423 WARN_ON_ONCE(tsk->mm); in kthread_use_mm()
1425 task_lock(tsk); in kthread_use_mm()
1428 active_mm = tsk->active_mm; in kthread_use_mm()
1431 tsk->active_mm = mm; in kthread_use_mm()
1433 tsk->mm = mm; in kthread_use_mm()
1435 switch_mm_irqs_off(active_mm, mm, tsk); in kthread_use_mm()
1437 task_unlock(tsk); in kthread_use_mm()
1464 struct task_struct *tsk = current; in kthread_unuse_mm() local
1466 WARN_ON_ONCE(!(tsk->flags & PF_KTHREAD)); in kthread_unuse_mm()
1467 WARN_ON_ONCE(!tsk->mm); in kthread_unuse_mm()
1469 task_lock(tsk); in kthread_unuse_mm()
1480 tsk->mm = NULL; in kthread_unuse_mm()
1483 enter_lazy_tlb(mm, tsk); in kthread_unuse_mm()
1485 task_unlock(tsk); in kthread_unuse_mm()