From: Dietmar Eggemann <dietmar.eggemann@arm.com>
To: "benbjiang(蒋彪)" <benbjiang@tencent.com>
Cc: Jiang Biao <benbjiang@gmail.com>,
"mingo@redhat.com" <mingo@redhat.com>,
"peterz@infradead.org" <peterz@infradead.org>,
"juri.lelli@redhat.com" <juri.lelli@redhat.com>,
"vincent.guittot@linaro.org" <vincent.guittot@linaro.org>,
"rostedt@goodmis.org" <rostedt@goodmis.org>,
"bsegall@google.com" <bsegall@google.com>,
"mgorman@suse.de" <mgorman@suse.de>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] sched/fair: reduce preemption with IDLE tasks runable(Internet mail)
Date: Wed, 12 Aug 2020 20:39:08 +0200 [thread overview]
Message-ID: <3a1047fc-a86a-014a-b17a-eae71f669da1@arm.com> (raw)
In-Reply-To: <70236E62-AA36-48C1-9382-86353649253C@tencent.com>
On 12/08/2020 05:19, benbjiang(蒋彪) wrote:
> Hi,
>
>> On Aug 11, 2020, at 11:54 PM, Dietmar Eggemann <dietmar.eggemann@arm.com> wrote:
>>
>> On 11/08/2020 02:41, benbjiang(蒋彪) wrote:
>>> Hi,
>>>
>>>> On Aug 10, 2020, at 9:24 PM, Dietmar Eggemann <dietmar.eggemann@arm.com> wrote:
>>>>
>>>> On 06/08/2020 17:52, benbjiang(蒋彪) wrote:
>>>>> Hi,
>>>>>
>>>>>> On Aug 6, 2020, at 9:29 PM, Dietmar Eggemann <dietmar.eggemann@arm.com> wrote:
>>>>>>
>>>>>> On 03/08/2020 13:26, benbjiang(蒋彪) wrote:
>>>>>>>
>>>>>>>
>>>>>>>> On Aug 3, 2020, at 4:16 PM, Dietmar Eggemann <dietmar.eggemann@arm.com> wrote:
>>>>>>>>
>>>>>>>> On 01/08/2020 04:32, Jiang Biao wrote:
>>>>>>>>> From: Jiang Biao <benbjiang@tencent.com>
[...]
>> Trace a run of 2 SCHED_OTHER (nice 0) tasks and 1 SCHED_IDLE task on a
>> single CPU and trace_printk the conditions 'if (delta < 0)' and ' if
>> (delta > ideal_runtime)' in check_preempt_tick().
>>
>> Then do the same with 3 SCHED_OTHER (nice 0) tasks. You can also change
>> the niceness of the 2 SCHED_OTHER task to 19 to see some differences in
>> the kernelshark's task layout.
>>
>> rt-app (https://github.com/scheduler-tools/rt-app) is a nice tool to
>> craft those artificial use cases.
> With rt-app tool, sched_switch traced by ftrace, the result is as what I expected,
I use:
{
"tasks" : {
"task_other" : {
"instance" : 2,
"loop" : 200,
"policy" : "SCHED_OTHER",
"run" : 8000,
"timer" : { "ref" : "unique1" , "period" : 16000, "mode" : "absolute" },
"priority" : 0
},
"task_idle" : {
"instance" : 1,
"loop" : 200,
"policy" : "SCHED_IDLE",
"run" : 8000,
"timer" : { "ref" : "unique2" , "period" : 16000, "mode" : "absolute" }
}
},
"global" : {
"calibration" : 243, <-- Has to be calibrated against the CPU you run on !!!
"default_policy" : "SCHED_OTHER",
"duration" : -1
}
}
to have 2 (periodic) SCHED_OTHER and 1 SCHED_IDLE task.
> ** 2normal+1idle: idle preempt normal every 600+ms **
During the 3.2s the 2 SCHED_OTHER tasks run, the SCHED_IDLE task is
switched in only once, after ~2.5s.
> ** 3normal+idle: idle preempt normal every 1000+ms **
Ah, this was meant to be 3 SCHED_OTHER tasks only! To see the difference
in behavior.
> ** 2normal(nice 19)+1idle(nice 0): idle preempt normal every 30+ms **
During the 3.2s the 2 SCHED_OTHER tasks run, the SCHED_IDLE task is
switched in every ~45ms.
[...]
next prev parent reply other threads:[~2020-08-12 18:39 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-08-01 2:32 [PATCH] sched/fair: reduce preemption with IDLE tasks runable Jiang Biao
2020-08-03 8:16 ` Dietmar Eggemann
2020-08-03 11:26 ` [PATCH] sched/fair: reduce preemption with IDLE tasks runable(Internet mail) benbjiang(蒋彪)
2020-08-06 13:29 ` Dietmar Eggemann
2020-08-06 15:52 ` benbjiang(蒋彪)
2020-08-10 13:24 ` Dietmar Eggemann
2020-08-11 0:41 ` benbjiang(蒋彪)
2020-08-11 15:54 ` Dietmar Eggemann
2020-08-12 3:19 ` benbjiang(蒋彪)
2020-08-12 18:39 ` Dietmar Eggemann [this message]
2020-08-13 23:55 ` benbjiang(蒋彪)
2020-08-17 8:57 ` Dietmar Eggemann
2020-08-17 12:05 ` benbjiang(蒋彪)
2020-08-19 10:46 ` Dietmar Eggemann
2020-08-19 11:05 ` Vincent Guittot
2020-08-19 11:55 ` Dietmar Eggemann
2020-08-19 14:27 ` benbjiang(蒋彪)
2020-08-19 14:55 ` Vincent Guittot
2020-08-20 0:13 ` benbjiang(蒋彪)
2020-08-20 7:35 ` Vincent Guittot
2020-08-20 11:27 ` benbjiang(蒋彪)
2020-08-20 12:45 ` Vincent Guittot
2020-08-20 14:28 ` Jiang Biao
2020-08-20 14:36 ` Vincent Guittot
2020-08-21 0:14 ` Jiang Biao
2020-08-19 14:10 ` benbjiang(蒋彪)
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=3a1047fc-a86a-014a-b17a-eae71f669da1@arm.com \
--to=dietmar.eggemann@arm.com \
--cc=benbjiang@gmail.com \
--cc=benbjiang@tencent.com \
--cc=bsegall@google.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=vincent.guittot@linaro.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
Powered by JetHome