mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/xiang/erofs.git
synced 2026-10-28 12:53:14 +01:00
sched/smp: Always define is_percpu_thread() and scheduler_ipi()
Simplify the scheduler by making the CONFIG_SMP=y primitives of is_percpu_thread() and scheduler_ipi() unconditional. Signed-off-by: Ingo Molnar <[email protected]> Acked-by: Peter Zijlstra <[email protected]> Cc: Dietmar Eggemann <[email protected]> Cc: Juri Lelli <[email protected]> Cc: Linus Torvalds <[email protected]> Cc: Mel Gorman <[email protected]> Cc: Sebastian Andrzej Siewior <[email protected]> Cc: Shrikanth Hegde <[email protected]> Cc: Steven Rostedt <[email protected]> Cc: Valentin Schneider <[email protected]> Cc: Vincent Guittot <[email protected]> Link: https://lore.kernel.org/r/[email protected]
This commit is contained in:
1 parent
cac5cefbad
commit
06ddd17521
1 file changed
-8
@@ -1765,12 +1765,8 @@ extern struct pid *cad_pid;
|
||||
|
||||
static __always_inline bool is_percpu_thread(void)
|
||||
{
|
||||
#ifdef CONFIG_SMP
|
||||
return (current->flags & PF_NO_SETAFFINITY) &&
|
||||
(current->nr_cpus_allowed == 1);
|
||||
#else
|
||||
return true;
|
||||
#endif
|
||||
}
|
||||
|
||||
/* Per-process atomic flags. */
|
||||
@@ -1967,7 +1963,6 @@ extern void __set_task_comm(struct task_struct *tsk, const char *from, bool exec
|
||||
buf; \
|
||||
})
|
||||
|
||||
#ifdef CONFIG_SMP
|
||||
static __always_inline void scheduler_ipi(void)
|
||||
{
|
||||
/*
|
||||
@@ -1977,9 +1972,6 @@ static __always_inline void scheduler_ipi(void)
|
||||
*/
|
||||
preempt_fold_need_resched();
|
||||
}
|
||||
#else
|
||||
static inline void scheduler_ipi(void) { }
|
||||
#endif
|
||||
|
||||
extern unsigned long wait_task_inactive(struct task_struct *, unsigned int match_state);
|
||||
|
||||
|
||||
Reference in new issue
Block a user