lkml.org 
[lkml]   [2023]   [Jun]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH v2] sched/task_group: Re-layout structure to reduce false sharing
From
Date
On Mon, 2023-06-26 at 15:52 +0800, Chen Yu wrote:
>
>
> diff --git a/kernel/sched/sched.h b/kernel/sched/sched.h
> index ec7b3e0a2b20..067f1310bad2 100644
> --- a/kernel/sched/sched.h
> +++ b/kernel/sched/sched.h
> @@ -1958,8 +1958,10 @@ static inline void set_task_rq(struct task_struct *p, unsigned int cpu)
> #endif
>
> #ifdef CONFIG_RT_GROUP_SCHED
> - p->rt.rt_rq = tg->rt_rq[cpu];
> - p->rt.parent = tg->rt_se[cpu];
> + if (p->sched_class = &rt_sched_class) {
> + p->rt.rt_rq = tg->rt_rq[cpu];
> + p->rt.parent = tg->rt_se[cpu];
> + }

If we avoid the assignment for non-rt task, do you see it further improves
c2c bounce?

Tim

\
 
 \ /
  Last update: 2023-06-26 19:20    [W:0.143 / U:0.120 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site