[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CANRm+CxjtjGC8GYWpDUUg0MAQYwZy1rQ4YwqRPEQON0W7zv+EQ@mail.gmail.com>
Date: Tue, 20 Sep 2016 07:30:00 +0800
From: Wanpeng Li <kernellwp@...il.com>
To: Joonwoo Park <joonwoop@...eaurora.org>
Cc: Peter Zijlstra <peterz@...radead.org>,
Srivatsa Vaddagiri <vatsa@...eaurora.org>,
Ingo Molnar <mingo@...hat.com>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] sched: Fix SCHED_HRTICK bug leading to late preemption of tasks
2016-09-20 2:08 GMT+08:00 Joonwoo Park <joonwoop@...eaurora.org>:
> On Sun, Sep 18, 2016 at 07:28:32AM +0800, Wanpeng Li wrote:
>> 2016-09-17 9:28 GMT+08:00 Joonwoo Park <joonwoop@...eaurora.org>:
>> > From: Srivatsa Vaddagiri <vatsa@...eaurora.org>
>> >
>> > SCHED_HRTICK feature is useful to preempt SCHED_FAIR tasks on-the-dot
>> > (just when they would have exceeded their ideal_runtime). It makes use
>> > of a per-cpu hrtimer resource and hence alarming that hrtimer should
>> > be based on total SCHED_FAIR tasks a cpu has across its various cfs_rqs,
>> > rather than being based on number of tasks in a particular cfs_rq (as
>> > implemented currently). As a result, with current code, its possible for
>> > a running task (which is the sole task in its cfs_rq) to be preempted
>>
>> not be preempted much, right?
>
> I don't think so....
> By saying 'to be preempted much after its ideal_runtime has elapsed' I
> wanted to describe the current suboptimal behaviour.
I also described the current suboptimal behaviour. A running task
(which is the sole task in its cfs_rq) as the test case 2 you
mentioned in another reply is preempted after 10ms since the scheduler
tick, however, it will be preempted after 1.5ms since the hrtick fire
in test case 1. That's what I mean "not be preempted much for test
case 2".
Regards,
Wanpeng Li
Powered by blists - more mailing lists