From: K Prateek Nayak <kprateek.nayak@amd.com>
To: Zecheng Li <zli94@ncsu.edu>, Ingo Molnar <mingo@redhat.com>,
"Peter Zijlstra" <peterz@infradead.org>,
Juri Lelli <juri.lelli@redhat.com>,
"Vincent Guittot" <vincent.guittot@linaro.org>
Cc: Dietmar Eggemann <dietmar.eggemann@arm.com>,
Steven Rostedt <rostedt@goodmis.org>,
Ben Segall <bsegall@google.com>, Mel Gorman <mgorman@suse.de>,
Valentin Schneider <vschneid@redhat.com>,
Rik van Riel <riel@surriel.com>, Chris Mason <clm@fb.com>,
Madadi Vineeth Reddy <vineethr@linux.ibm.com>,
Xu Liu <xliuprof@google.com>, Blake Jones <blakejones@google.com>,
Josh Don <joshdon@google.com>,
Nilay Vaish <nilayvaish@google.com>,
<linux-kernel@vger.kernel.org>, Zecheng Li <zecheng@google.com>
Subject: Re: [PATCH v7 2/3] sched/fair: Remove task_group->se pointer array
Date: Mon, 19 Jan 2026 12:13:13 +0530 [thread overview]
Message-ID: <846a25a5-60d4-4d6c-8d06-cd7b96fce8df@amd.com> (raw)
In-Reply-To: <20260118033431.158464-3-zli94@ncsu.edu>
Hello Zecheng,
On 1/18/2026 9:04 AM, Zecheng Li wrote:
> @@ -2201,6 +2200,26 @@ struct cfs_tg_state {
> struct sched_entity se;
> struct sched_statistics stats;
> } __no_randomize_layout;
> +
> +static inline struct sched_entity *tg_se(struct task_group *tg, int cpu)
> +{
> + if (is_root_task_group(tg))
> + return NULL;
> +
> + struct cfs_tg_state *state =
nit. Can you move the declaration of "struct cfs_tg_state *state" to the
top of the function. Same for cfs_rq_se().
> + container_of(tg->cfs_rq[cpu], struct cfs_tg_state, cfs_rq);
> + return &state->se;
> +}
> +
> +static inline struct sched_entity *cfs_rq_se(struct cfs_rq *cfs_rq)
> +{
> + if (is_root_task_group(cfs_rq->tg))
> + return NULL;
> +
> + struct cfs_tg_state *state =
> + container_of(cfs_rq, struct cfs_tg_state, cfs_rq);
> + return &state->se;
> +}
> #endif
--
Thanks and Regards,
Prateek
next prev parent reply other threads:[~2026-01-19 6:43 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-18 3:34 [PATCH v7 0/3] sched/fair: Optimize cfs_rq and sched_entity allocation for better data locality Zecheng Li
2026-01-18 3:34 ` [PATCH v7 1/3] sched/fair: Co-locate cfs_rq and sched_entity in cfs_tg_state Zecheng Li
2026-01-19 6:40 ` K Prateek Nayak
2026-01-18 3:34 ` [PATCH v7 2/3] sched/fair: Remove task_group->se pointer array Zecheng Li
2026-01-19 6:43 ` K Prateek Nayak [this message]
2026-01-18 3:34 ` [PATCH v7 3/3] sched/fair: Allocate both cfs_tg_state with percpu allocator Zecheng Li
2026-01-19 7:17 ` K Prateek Nayak
2026-01-20 19:11 ` Zecheng Li
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=846a25a5-60d4-4d6c-8d06-cd7b96fce8df@amd.com \
--to=kprateek.nayak@amd.com \
--cc=blakejones@google.com \
--cc=bsegall@google.com \
--cc=clm@fb.com \
--cc=dietmar.eggemann@arm.com \
--cc=joshdon@google.com \
--cc=juri.lelli@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mgorman@suse.de \
--cc=mingo@redhat.com \
--cc=nilayvaish@google.com \
--cc=peterz@infradead.org \
--cc=riel@surriel.com \
--cc=rostedt@goodmis.org \
--cc=vincent.guittot@linaro.org \
--cc=vineethr@linux.ibm.com \
--cc=vschneid@redhat.com \
--cc=xliuprof@google.com \
--cc=zecheng@google.com \
--cc=zli94@ncsu.edu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®