From: Vincent Guittot <vincent.guittot@linaro.org>
To: Dietmar Eggemann <dietmar.eggemann@arm.com>
Cc: mingo@redhat.com, peterz@infradead.org, juri.lelli@redhat.com,
rostedt@goodmis.org, bsegall@google.com, mgorman@suse.de,
bristot@redhat.com, vschneid@redhat.com,
linux-kernel@vger.kernel.org, zhangqiao22@huawei.com
Subject: Re: [PATCH 2/4] sched/fair: cleanup loop_max and loop_break
Date: Tue, 13 Sep 2022 10:37:16 +0200 [thread overview]
Message-ID: <CAKfTPtC7V+G6ybu6Bk8=W9TbTm+cL7M6qDT-aww6ZWcBTa87TA@mail.gmail.com> (raw)
In-Reply-To: <294b8903-393f-7242-a887-6ec6d6fc829e@arm.com>
On Mon, 12 Sept 2022 at 10:45, Dietmar Eggemann
<dietmar.eggemann@arm.com> wrote:
>
> On 25/08/2022 14:27, Vincent Guittot wrote:
> > sched_nr_migrate_break is set to a fix value and never changes so we can
> > replace it by a define SCHED_NR_MIGRATE_BREAK.
> >
> > Also, we adjust SCHED_NR_MIGRATE_BREAK to be aligned with the init value
> > of sysctl_sched_nr_migrate which can be init to different values.
> >
> > Then, use SCHED_NR_MIGRATE_BREAK to init sysctl_sched_nr_migrate.
> >
> > The behavior stays unchanged unless you modify sysctl_sched_nr_migrate
> > trough debugfs.
>
> I don't quite get this sentence. The behavior would potentially change
> if you change sysctl_sched_nr_migrate before this patch too?
the behavior is different if you change the sysctl_sched_nr_migrate.
With this patch, loop_break is now aligned with
sysctl_sched_nr_migrate value which was not the case for
CONFIG_PREEMPT_RT. For the latter, the behavior can change if you
increase sysctl_sched_nr_migrate at runtime because there is now at
least one break whereas it was not the case before as long as
sysctl_sched_nr_migrate stayed below 32
>
> >
> > Signed-off-by: Vincent Guittot <vincent.guittot@linaro.org>
> > ---
> > kernel/sched/core.c | 6 +-----
> > kernel/sched/fair.c | 11 ++++-------
> > kernel/sched/sched.h | 6 ++++++
> > 3 files changed, 11 insertions(+), 12 deletions(-)
> >
> > diff --git a/kernel/sched/core.c b/kernel/sched/core.c
> > index 64c08993221b..a21e817bdd1c 100644
> > --- a/kernel/sched/core.c
> > +++ b/kernel/sched/core.c
> > @@ -142,11 +142,7 @@ __read_mostly int sysctl_resched_latency_warn_once = 1;
> > * Number of tasks to iterate in a single balance run.
> > * Limited because this is done with IRQs disabled.
> > */
>
> ^^^
> Shouldn't this comment be removed as well?
>
> > -#ifdef CONFIG_PREEMPT_RT
> > -const_debug unsigned int sysctl_sched_nr_migrate = 8;
> > -#else
> > -const_debug unsigned int sysctl_sched_nr_migrate = 32;
> > -#endif
> > +const_debug unsigned int sysctl_sched_nr_migrate = SCHED_NR_MIGRATE_BREAK;
> >
> > __read_mostly int scheduler_running;
>
> [...]
next prev parent reply other threads:[~2022-09-13 8:37 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-25 12:27 [PATCH 0/4] sched/fair: fixes in presence of lot of sched_idle tasks Vincent Guittot
2022-08-25 12:27 ` [PATCH 1/4] sched/fair: make sure to try to detach at least one movable task Vincent Guittot
2022-09-12 8:44 ` Dietmar Eggemann
2022-09-13 8:54 ` Vincent Guittot
2022-09-15 14:24 ` [tip: sched/core] sched/fair: Make " tip-bot2 for Vincent Guittot
2024-02-12 20:28 ` [PATCH 1/4] sched/fair: make " Josh Don
2024-03-20 16:57 ` Vincent Guittot
2024-03-21 20:25 ` Josh Don
2024-03-22 17:16 ` Vincent Guittot
2024-03-22 19:49 ` Josh Don
2022-08-25 12:27 ` [PATCH 2/4] sched/fair: cleanup loop_max and loop_break Vincent Guittot
2022-09-12 8:45 ` Dietmar Eggemann
2022-09-13 8:37 ` Vincent Guittot [this message]
2022-09-15 14:24 ` [tip: sched/core] sched/fair: Cleanup " tip-bot2 for Vincent Guittot
2022-08-25 12:27 ` [PATCH 3/4] sched/fair: move call to list_last_entry() in detach_tasks Vincent Guittot
2022-09-12 8:46 ` Dietmar Eggemann
2022-09-15 14:24 ` [tip: sched/core] sched/fair: Move " tip-bot2 for Vincent Guittot
2022-08-25 12:27 ` [PATCH 4/4] sched/fair: limit sched slice duration Vincent Guittot
2022-09-09 11:14 ` Peter Zijlstra
2022-09-09 14:03 ` Vincent Guittot
2022-09-09 15:05 ` 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='CAKfTPtC7V+G6ybu6Bk8=W9TbTm+cL7M6qDT-aww6ZWcBTa87TA@mail.gmail.com' \
--to=vincent.guittot@linaro.org \
--cc=bristot@redhat.com \
--cc=bsegall@google.com \
--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=peterz@infradead.org \
--cc=rostedt@goodmis.org \
--cc=vschneid@redhat.com \
--cc=zhangqiao22@huawei.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 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).