lkml.org 
[lkml]   [2020]   [Sep]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 7/9] sched: Add migrate_disable()
On 2020-09-21 18:36:04 [+0200], Peter Zijlstra wrote:
> --- a/kernel/sched/core.c
> +++ b/kernel/sched/core.c
> @@ -1700,6 +1700,68 @@ void check_preempt_curr(struct rq *rq, s
>
> #ifdef CONFIG_SMP
>
> +#ifdef CONFIG_PREEMPT_RT

> +static inline bool is_migration_disabled(struct task_struct *p)
> +{
> + return p->migration_disabled;
> +}

Just a thought: having this with int as return type and defined in a
header file then it could be used in check_preemption_disabled() and in
the tracing output.

> +#else
> +
> +static inline void migrate_disable_switch(struct rq *rq, struct task_struct *p) { }
> +
> +static inline bool is_migration_disabled(struct task_struct *p)
> +{
> + return false;
> +}
> +
> +#endif

Sebastian

\
 
 \ /
  Last update: 2020-09-25 18:51    [W:0.234 / U:0.148 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site