lkml.org 
[lkml]   [2024]   [Mar]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    SubjectRe: [PATCH 26/30] sched: handle preempt=voluntary under PREEMPT_AUTO
    From
    Hi Ankur,

    On 3/5/2024 3:11 AM, Ankur Arora wrote:
    >
    > Joel Fernandes <joel@joelfernandes.org> writes:
    >
    [..]
    >> IMO, just kill 'voluntary' if PREEMPT_AUTO is enabled. There is no
    >> 'voluntary' business because
    >> 1. The behavior vs =none is to allow higher scheduling class to preempt, it
    >> is not about the old voluntary.
    >
    > What do you think about folding the higher scheduling class preemption logic
    > into preempt=none? As Juri pointed out, prioritization of at least the leftmost
    > deadline task needs to be done for correctness.
    >
    > (That'll get rid of the current preempt=voluntary model, at least until
    > there's a separate use for it.)

    Yes I am all in support for that. Its less confusing for the user as well, and
    scheduling higher priority class at the next tick for preempt=none sounds good
    to me. That is still an improvement for folks using SCHED_DEADLINE for whatever
    reason, with a vanilla CONFIG_PREEMPT_NONE=y kernel. :-P. If we want a new mode
    that is more aggressive, it could be added in the future.

    >> 2. you are also planning to remove cond_resched()s via this series and leave
    >> it to the scheduler right?
    >
    > Yeah, under PREEMPT_AUTO, cond_resched() will /almost/ be not there. Gets
    > defined to:
    >
    > static inline int _cond_resched(void)
    > {
    > klp_sched_try_switch();
    > return 0;
    > }
    >
    > Right now, we need cond_resched() to make timely forward progress while
    > doing live-patching.

    Cool, got it!

    >> Or call it preempt=higher, or something? No one is going to understand the
    >> meaning of voluntary the way it is implied here IMHO.
    >
    > I don't think there's enough to make it worth adding a new model. For
    > now I'm tending towards moving the correctness parts to preempt=none and
    > making preempt=voluntary identical to preempt=none.

    Got it, sounds good.

    > Thanks for the review.

    Sure! Thanks for this work. Looking forward to the next series,

    - Joel


    \
     
     \ /
      Last update: 2024-05-27 15:38    [W:9.296 / U:0.076 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site