lkml.org 
[lkml]   [2023]   [Feb]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [RFC PATCH] sched/fair: update the vruntime to be max vruntime when yield
    On Mon, 27 Feb 2023 16:40:33 +0100
    Peter Zijlstra <peterz@infradead.org> wrote:

    > On Wed, Feb 22, 2023 at 04:03:14PM +0800, Xuewen Yan wrote:
    > > When task call the sched_yield, cfs would set the cfs's skip buddy.
    > > If there is no other task call the sched_yield syscall, the task would
    > > always be skiped when there are tasks in rq.
    >
    > So you have two tasks A) which does sched_yield() and becomes ->skip,
    > and B) which is while(1). And you're saying that once A does it's thing,
    > B runs forever and starves A?

    If Xuewen has an example program that demonstrates the issue (pinning to a
    CPU the two tasks), that could be very useful.

    > This is a bad solution, SCHED_IDLE tasks have very low weight and can be
    > shot really far to the right, leading to other trouble.

    Does SCHED_IDLE tasks have to run on a busy CPU? That is, if you have a
    SCHED_OTHER task running in a while loop, a SCHED_IDLE task will still get
    runtime on that CPU? I always thought SCHED_IDLE tasks were just background
    tasks for running when there was nothing else to run?

    -- Steve

    \
     
     \ /
      Last update: 2023-03-27 00:37    [W:4.358 / U:1.032 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site