linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: K Prateek Nayak <kprateek.nayak@amd.com>
To: Linus Torvalds <torvalds@linux-foundation.org>,
	"Prundeanu, Cristian" <cpru@amazon.com>
Cc: Peter Zijlstra <peterz@infradead.org>,
	"Mohamed Abuelfotoh, Hazem" <abuehaze@amazon.com>,
	"Saidi, Ali" <alisaidi@amazon.com>,
	"Benjamin Herrenschmidt" <benh@kernel.crashing.org>,
	"Blake, Geoff" <blakgeof@amazon.com>,
	"Csoma, Csaba" <csabac@amazon.com>,
	"Doebel, Bjoern" <doebel@amazon.de>,
	Gautham Shenoy <gautham.shenoy@amd.com>,
	Swapnil Sapkal <swapnil.sapkal@amd.com>,
	Joseph Salisbury <joseph.salisbury@oracle.com>,
	Dietmar Eggemann <dietmar.eggemann@arm.com>,
	Ingo Molnar <mingo@redhat.com>, Borislav Petkov <bp@alien8.de>,
	"linux-arm-kernel@lists.infradead.org"
	<linux-arm-kernel@lists.infradead.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"linux-tip-commits@vger.kernel.org"
	<linux-tip-commits@vger.kernel.org>,
	"x86@kernel.org" <x86@kernel.org>
Subject: Re: EEVDF regression still exists
Date: Sat, 3 May 2025 09:04:28 +0530	[thread overview]
Message-ID: <6a83c7fb-dbfa-49df-be8b-f1257ad1a47a@amd.com> (raw)
In-Reply-To: <CAHk-=wgb5WcfMEgsOQg4wzVWuYNgCL-e17YX33ZET_G3-ZCo7g@mail.gmail.com>

Hello Linus,

On 5/2/2025 11:22 PM, Linus Torvalds wrote:
> On Fri, 2 May 2025 at 10:25, Prundeanu, Cristian <cpru@amazon.com> wrote:
>>
>> Another, more recent observation is that 6.15-rc4 has worse performance than
>> rc3 and earlier kernels. Maybe that can help narrow down the cause?
>> I've added the perf reports for rc3 and rc2 in the same location as before.
> 
> The only _scheduler_ change that looks relevant is commit bbce3de72be5
> ("sched/eevdf: Fix se->slice being set to U64_MAX and resulting
> crash"). Which does affect the slice calculation, although supposedly
> only under special circumstances.> 
> Of course, it could be something else.

Since it is the only !SCHED_EXT change in kernel/sched, Cristian can
perhaps try reverting it on top of v6.15-rc4 and checking if the
benchmark results jump back to v6.15-rc3 level to rule that single
change out. Very likely it could be something else.

> 
> For example, we have a AMD performance regression in general due to
> _another_ CPU leak mitigation issue, but that predates rc3 (happened
> during the merge window), so that one isn't relevant, but maybe
> something else is..
> 
> Although honestly, that slice calculation still looks just plain odd.
> It defaults the slice to zero, so if none of the 'break' conditions in
> the first loop happens, it will reset the slice to that zero value and

I believe setting slice to U64_MAX was the actual problem. Previously,
when the slice was initialized as:

       cfs_rq = group_cfs_rq(se);
       slice = cfs_rq_min_slice(cfs_rq);

If the "se" was delayed, it basically means that the group_cfs_rq() had
no tasks on it and cfs_rq_min_slice() would return "~0ULL" which will
get propagated and can lead to bad math.

> then the
> 
>          slice = cfs_rq_min_slice(cfs_rq);
> 
> ion that second loop looks like it might just pick up that zero value again.

If the first loop does not break, even for "if (cfs_rq->load.weight)",
it basically means that there are no tasks / delayed entities queued
all the way until root cfs_rq so the slices shouldn't matter.

Enqueue of the next task will correct the slices for the queued
hierarchy.

> 
> I clearly don't understand the code.
> 
>               Linus

-- 
Thanks and Regards,
Prateek



      reply	other threads:[~2025-05-03  3:36 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-29 21:38 EEVDF regression still exists Cristian Prundeanu
2025-04-29 21:56 ` Peter Zijlstra
2025-04-29 22:06   ` Prundeanu, Cristian
2025-04-30  3:33     ` K Prateek Nayak
2025-05-01 16:16       ` Prundeanu, Cristian
2025-05-02  5:56         ` K Prateek Nayak
2025-05-02  6:33           ` K Prateek Nayak
2025-05-02 18:06             ` Prundeanu, Cristian
2025-05-02  8:48         ` Peter Zijlstra
2025-05-02 16:52           ` Prundeanu, Cristian
2025-05-14 21:26             ` Dietmar Eggemann
2025-04-30 10:02 ` Peter Zijlstra
2025-05-02  7:08   ` Sapkal, Swapnil
2025-05-02 17:25   ` Prundeanu, Cristian
2025-05-02 17:52     ` Linus Torvalds
2025-05-03  3:34       ` K Prateek Nayak [this message]

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=6a83c7fb-dbfa-49df-be8b-f1257ad1a47a@amd.com \
    --to=kprateek.nayak@amd.com \
    --cc=abuehaze@amazon.com \
    --cc=alisaidi@amazon.com \
    --cc=benh@kernel.crashing.org \
    --cc=blakgeof@amazon.com \
    --cc=bp@alien8.de \
    --cc=cpru@amazon.com \
    --cc=csabac@amazon.com \
    --cc=dietmar.eggemann@arm.com \
    --cc=doebel@amazon.de \
    --cc=gautham.shenoy@amd.com \
    --cc=joseph.salisbury@oracle.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tip-commits@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=peterz@infradead.org \
    --cc=swapnil.sapkal@amd.com \
    --cc=torvalds@linux-foundation.org \
    --cc=x86@kernel.org \
    /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;
as well as URLs for NNTP newsgroup(s).