lkml.org 
[lkml]   [2023]   [Oct]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 3/4] rcu/tasks-trace: Handle new PF_IDLE semantics
    Date
    The commit:

    cff9b2332ab7 ("kernel/sched: Modify initial boot task idle setup")

    has changed the semantics of what is to be considered an idle task in
    such a way that the idle task of an offline CPU may not carry the
    PF_IDLE flag anymore.

    However RCU-tasks-trace tests the opposite assertion, still assuming
    that idle tasks carry the PF_IDLE flag during their whole lifecycle.

    Remove this assumption to avoid spurious warnings but keep the initial
    test verifying that the idle task is the current task on any offline
    CPU.

    Reported-by: Naresh Kamboju <naresh.kamboju@linaro.org>
    Fixes: cff9b2332ab7 ("kernel/sched: Modify initial boot task idle setup")
    Suggested-by: Joel Fernandes <joel@joelfernandes.org>
    Suggested-by: Paul E . McKenney" <paulmck@kernel.org>
    Signed-off-by: Frederic Weisbecker <frederic@kernel.org>
    ---
    kernel/rcu/tasks.h | 2 +-
    1 file changed, 1 insertion(+), 1 deletion(-)

    diff --git a/kernel/rcu/tasks.h b/kernel/rcu/tasks.h
    index acf81efe5eff..4dd70f2af4af 100644
    --- a/kernel/rcu/tasks.h
    +++ b/kernel/rcu/tasks.h
    @@ -1552,7 +1552,7 @@ static int trc_inspect_reader(struct task_struct *t, void *bhp_in)
    } else {
    // The task is not running, so C-language access is safe.
    nesting = t->trc_reader_nesting;
    - WARN_ON_ONCE(ofl && task_curr(t) && !is_idle_task(t));
    + WARN_ON_ONCE(ofl && task_curr(t) && (t != idle_task(task_cpu(t))));
    if (IS_ENABLED(CONFIG_TASKS_TRACE_RCU_READ_MB) && ofl)
    n_heavy_reader_ofl_updates++;
    }
    --
    2.41.0
    \
     
     \ /
      Last update: 2023-10-24 23:47    [W:2.228 / U:0.028 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site