Re: [PATCH v5] sched: reorder some fields in struct rq
From: Peter Zijlstra
Date: Fri Dec 05 2025 - 05:49:54 EST
On Thu, Dec 04, 2025 at 02:56:47PM -0800, Josh Don wrote:
> Hi Blake,
>
> On Mon, Dec 1, 2025 at 6:37 PM Blake Jones <blakejones@xxxxxxxxxx> wrote:
> >
> > This colocates some hot fields in "struct rq" to be on the same cache line
> > as others that are often accessed at the same time or in similar ways.
> [snip]
> > Signed-off-by: Blake Jones <blakejones@xxxxxxxxxx>
> > Reviewed-by: Madadi Vineeth Reddy <vineethr@xxxxxxxxxxxxx>
> > Tested-by: Madadi Vineeth Reddy <vineethr@xxxxxxxxxxxxx>
>
> Sorry, I thought I had already included a review tag when I responded
> to the earlier version of this.
>
> Reviewed-by: Josh Don <joshdon@xxxxxxxxxx>
>
> > ---
> > kernel/sched/sched.h | 80 +++++++++++++++++++++++++++-----------------
> > 1 file changed, 50 insertions(+), 30 deletions(-)
> >
> > v4 -> v5 changes:
> > - Resynced with sched/core.
> > Link to v4: https://lore.kernel.org/lkml/20251029185458.3040228-1-blakejones@xxxxxxxxxx/T/#u
> >
> > v3 -> v4 changes:
> > - Updated based on review comments from peterz@xxxxxxxxxxxxx:
> > updated block comment in struct rq, moved "nr_iowait" to the end of the
> > structure, and added "__no_randomize_layout" tag to the structure.
> > Link to v3: https://lore.kernel.org/lkml/20251028080348.2177469-1-blakejones@xxxxxxxxxx/T/#u
> >
> > v2 -> v3 changes:
> > - Resynced and retested. Results are consistent with v2.
> > Link to v2: https://lore.kernel.org/lkml/20250730205644.2595052-1-blakejones@xxxxxxxxxx/T/#u
> >
> > v1 -> v2 changes:
> > - Resynced to tip/sched/core tree, which has removed CONFIG_SMP.
> > Link to v1: https://lore.kernel.org/lkml/20250722201339.1198239-1-blakejones@xxxxxxxxxx/T/#u
> >
> > v1 was sent on July 22 of this year, over four months ago.
>
> The patch is straightforward and the results look compelling;
> Peter/Ingo, any thoughts?
I've stuck it on the pile for post -rc1 time.