From: Peter Zijlstra <peterz@infradead.org>
To: Vincent Guittot <vincent.guittot@linaro.org>
Cc: mingo@redhat.com, juri.lelli@redhat.com,
dietmar.eggemann@arm.com, rostedt@goodmis.org,
bsegall@google.com, mgorman@suse.de, vschneid@redhat.com,
dhaval@gianis.ca, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v3 2/6] sched/fair: Fix NO_RUN_TO_PARITY case
Date: Wed, 9 Jul 2025 11:17:41 +0200 [thread overview]
Message-ID: <20250709091741.GH1613200@noisy.programming.kicks-ass.net> (raw)
In-Reply-To: <20250708165630.1948751-3-vincent.guittot@linaro.org>
On Tue, Jul 08, 2025 at 06:56:26PM +0200, Vincent Guittot wrote:
> static inline void set_protect_slice(struct sched_entity *se)
> {
> - se->vlag = se->deadline;
> + u64 quantum = se->slice;
> +
> + if (!sched_feat(RUN_TO_PARITY))
> + quantum = min(quantum, normalized_sysctl_sched_base_slice);
> +
> + if (quantum != se->slice)
> + se->vprot = min_vruntime(se->deadline, se->vruntime + calc_delta_fair(quantum, se));
> + else
> + se->vprot = se->deadline;
> }
I've done s/quantum/slice/ on the whole series. In the end this thing:
> +static inline bool resched_next_quantum(struct cfs_rq *cfs_rq, struct sched_entity *curr)
is gone, and *_protect_slice() has slice in the name, and its mostly
assigned from slice named variables.
Final form ends up looking like so:
static inline void set_protect_slice(struct cfs_rq *cfs_rq, struct sched_entity *se)
{
u64 slice = normalized_sysctl_sched_base_slice;
u64 vprot = se->deadline;
if (sched_feat(RUN_TO_PARITY))
slice = cfs_rq_min_slice(cfs_rq);
slice = min(slice, se->slice);
if (slice != se->slice)
vprot = min_vruntime(vprot, se->vruntime + calc_delta_fair(slice, se));
se->vprot = vprot;
}
I'll run a few compiles and then push out to queue/sched/core (and stick
the ttwu bits in queue/sched/ttwu -- as I should've done earlier).
next prev parent reply other threads:[~2025-07-09 9:17 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-08 16:56 [PATCH v3 0/6] sched/fair: Manage lag and run to parity with different slices Vincent Guittot
2025-07-08 16:56 ` [PATCH v3 1/6] sched/fair: Use protect_slice() instead of direct comparison Vincent Guittot
2025-07-10 12:46 ` [tip: sched/core] " tip-bot2 for Vincent Guittot
2025-07-08 16:56 ` [PATCH v3 2/6] sched/fair: Fix NO_RUN_TO_PARITY case Vincent Guittot
2025-07-09 9:17 ` Peter Zijlstra [this message]
2025-07-09 9:32 ` Vincent Guittot
2025-07-10 12:46 ` [tip: sched/core] " tip-bot2 for Vincent Guittot
2025-07-08 16:56 ` [PATCH v3 3/6] sched/fair: Remove spurious shorter slice preemption Vincent Guittot
2025-07-10 12:46 ` [tip: sched/core] " tip-bot2 for Vincent Guittot
2025-07-08 16:56 ` [PATCH v3 4/6] sched/fair: Limit run to parity to the min slice of enqueued entities Vincent Guittot
2025-07-10 6:59 ` Madadi Vineeth Reddy
2025-07-10 10:40 ` Vincent Guittot
2025-07-10 12:34 ` Peter Zijlstra
2025-07-13 18:17 ` Madadi Vineeth Reddy
2025-07-20 10:57 ` Madadi Vineeth Reddy
2025-07-21 9:11 ` Vincent Guittot
2025-07-21 15:22 ` Madadi Vineeth Reddy
2025-07-21 9:06 ` Vincent Guittot
2025-07-10 12:46 ` [tip: sched/core] " tip-bot2 for Vincent Guittot
2025-07-08 16:56 ` [PATCH v3 5/6] sched/fair: Fix entity's lag with run to parity Vincent Guittot
2025-07-10 12:46 ` [tip: sched/core] " tip-bot2 for Vincent Guittot
2025-07-08 16:56 ` [PATCH v3 6/6] sched/fair: Always trigger resched at the end of a protected period Vincent Guittot
2025-07-10 12:46 ` [tip: sched/core] " tip-bot2 for Vincent Guittot
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=20250709091741.GH1613200@noisy.programming.kicks-ass.net \
--to=peterz@infradead.org \
--cc=bsegall@google.com \
--cc=dhaval@gianis.ca \
--cc=dietmar.eggemann@arm.com \
--cc=juri.lelli@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mgorman@suse.de \
--cc=mingo@redhat.com \
--cc=rostedt@goodmis.org \
--cc=vincent.guittot@linaro.org \
--cc=vschneid@redhat.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.