mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Shrikanth Hegde <sshegde@linux.ibm.com>
To: Vincent Guittot <vincent.guittot@linaro.org>
Cc: qyousef@layalina.io, christian.loehle@arm.com,
	pierre.gondois@arm.com, mingo@redhat.com, peterz@infradead.org,
	juri.lelli@redhat.com, dietmar.eggemann@arm.com,
	rostedt@goodmis.org, bsegall@google.com, mgorman@suse.de,
	vschneid@redhat.com, kprateek.nayak@amd.com,
	linux-kernel@vger.kernel.org, lukasz.luba@arm.com,
	rafael@kernel.org, linux-pm@vger.kernel.org, tj@kernel.org,
	void@manifault.com, arighi@nvidia.com, changwoo@igalia.com,
	sched-ext@lists.linux.dev
Subject: Re: [PATCH 07/18] sched/fair: Add push task mechanism for fair
Date: Wed, 14 Oct 2026 21:58:04 +0530	[thread overview]
Message-ID: <4976fcef-29ec-43fd-8655-32874720ee73@linux.ibm.com> (raw)
In-Reply-To: <CAKfTPtDkSs8KOUYAdSOz_h93khGbT6TaVc9gCa1Cpa0JbmKEGw@mail.gmail.com>


>>> +static int
>>> +select_task_rq_fair(struct task_struct *p, int prev_cpu, int wake_flags);
>>> +
>>> +/*
>>> + * See if the non running fair tasks on this rq can be sent on other CPUs
>>> + * that fits better with their profile.
>>> + */
>>> +static bool fair_push_task(struct rq *rq)
>>> +{
>>> +     struct task_struct *next_task;
>>> +     int prev_cpu, new_cpu;
>>> +     struct rq_flags rf;
>>> +     struct rq *cur_rq;
>>
>> You likely need below to keep clang's context tracking to be happy.
>>
>>          context_unsafe_alias(rq);
> 
> I just noticed that I didn't answer to this one
> 
> Why should I need this ?
> 
> rq remains the same in fair_push_task(). I'm using rq and new_rq to
> differentiate both current and new rq
> 
>>
I tried to use clang-23 and get below with the series applied.
It may not be exactly here. But somewhere.

make LLVM=/opt/llvm-23/bin/ \
         KCFLAGS="-Werror=thread-safety-analysis" \
         V=1 kernel/sched/fair.o

kernel/sched/fair.c:9971:2: error: releasing raw_spinlock 'rq_lockp(rq)' that was not held [-Werror,-Wthread-safety-analysis]
  9971 |         raw_spin_rq_unlock(rq);
       |         ^
kernel/sched/fair.c:9983:2: error: raw_spinlock 'rq_lockp(rq)' is not held on every path through here [-Werror,-Wthread-safety-analysis]
  9983 |         raw_spin_unlock(&next_task->pi_lock);
       |         ^
./include/linux/spinlock.h:279:32: note: expanded from macro 'raw_spin_unlock'
   279 | #define raw_spin_unlock(lock)           _raw_spin_unlock(lock)
       |                                         ^
kernel/sched/fair.c:9980:2: note: raw_spinlock acquired here
  9980 |         raw_spin_rq_lock(rq);
       |         ^
kernel/sched/fair.c:10085:2: error: releasing raw_spinlock 'rq_lockp(rq)' that was not held [-Werror,-Wthread-safety-analysis]
  10085 |         rq_unlock(rq, rf);
        |         ^
kernel/sched/fair.c:10093:1: error: raw_spinlock 'rq_lockp(rq)' is not held on every path through here
       [-Werror,-Wthread-safety-analysis]
  10093 | }
        | ^
kernel/sched/fair.c:10090:2: note: raw_spinlock acquired here
  10090 |         rq_lock(rq, rf);
        |         ^

  reply	other threads:[~2026-10-14 16:28 UTC|newest]

Thread overview: 55+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-02 15:43 [PATCH 00/18 v2] Improving latency of short slice tasks Vincent Guittot
2026-10-02 15:43 ` [PATCH 01/18 v2] sched/eevdf: Decay positive lag of sleeping entities Vincent Guittot
2026-10-02 15:43 ` [PATCH 02/18] sched/eevdf: Reset lag when waking up on idle cpu Vincent Guittot
2026-10-04 17:30   ` Kayra Cizmeci
2026-10-09 13:35     ` Vincent Guittot
2026-10-02 15:44 ` [PATCH 03/18 v2] sched/eevdf: Add per cpu cached min_slice Vincent Guittot
2026-10-02 15:44 ` [PATCH 04/18 v2] sched/eevdf: Compare min slice during wake_affine Vincent Guittot
2026-10-05 15:58   ` Kayra Cizmeci
2026-10-02 15:44 ` [PATCH 05/18 v2] sched/eevdf: Add min slice check when selecting CPU Vincent Guittot
2026-10-04 19:18   ` Kayra Cizmeci
2026-10-02 15:44 ` [PATCH 06/18 v2] sched/fair: Prepare select_task_rq_fair() to be called for new cases Vincent Guittot
2026-10-06 22:25   ` Tim Chen
2026-10-09 13:36     ` Vincent Guittot
2026-10-02 15:44 ` [PATCH 07/18] sched/fair: Add push task mechanism for fair Vincent Guittot
2026-10-07  2:45   ` Chen Yu
2026-10-09 13:38     ` Vincent Guittot
2026-10-09 14:31     ` Vincent Guittot
2026-10-10 15:42       ` Chen Yu
2026-10-12  9:18         ` Vincent Guittot
2026-10-13  5:17           ` Chen Yu
2026-10-14  7:20             ` Vincent Guittot
2026-10-12 14:06   ` Shrikanth Hegde
2026-10-14  7:19     ` Vincent Guittot
2026-10-14 15:37     ` Vincent Guittot
2026-10-14 16:28       ` Shrikanth Hegde [this message]
2026-10-15  8:02         ` Vincent Guittot
2026-10-02 15:44 ` [PATCH 08/18] sched/fair: Optimize " Vincent Guittot
2026-10-02 15:44 ` [PATCH 09/18 v2] sched/core: Add rq flag to tick parameters Vincent Guittot
2026-10-02 15:44 ` [PATCH 10/18 v2] sched/fair: Add force push task mechanism for fair Vincent Guittot
2026-10-06 19:24   ` Kayra Cizmeci
2026-10-09 14:01     ` Vincent Guittot
2026-10-09  5:53   ` Kayra Cizmeci
2026-10-09 14:04     ` Vincent Guittot
2026-10-09 14:47       ` Vincent Guittot
2026-10-11 17:40         ` Kayra Cizmeci
2026-10-12  8:18           ` Vincent Guittot
2026-10-12 13:40             ` Kayra Cizmeci
2026-10-02 15:44 ` [PATCH 11/18 v2] sched/fair: Support not wakeup case in select_idle_sibling Vincent Guittot
2026-10-07 17:55   ` Tim Chen
2026-10-09 14:06     ` Vincent Guittot
2026-10-02 15:44 ` [PATCH 12/18 v2] sched/eevdf: Try to push short slice task on a better CPU Vincent Guittot
2026-10-02 15:44 ` [PATCH 13/18 v2] sched/eevdf: Push short slice task that are not picked Vincent Guittot
2026-10-02 15:44 ` [PATCH 14/18 v2] sched/fair: Enable push task for preempt short Vincent Guittot
2026-10-09 11:16   ` Kayra Cizmeci
2026-10-09 14:07     ` Vincent Guittot
2026-10-02 15:44 ` [PATCH 15/18 v2] energy model: Add a get previous state function Vincent Guittot
2026-10-02 15:44 ` [PATCH 16/18 v2] sched/fair: Rework feec() to use cost instead of spare capacity Vincent Guittot
2026-10-02 15:44 ` [PATCH 17/18 v2] energy model: Remove unused em_cpu_energy() Vincent Guittot
2026-10-02 15:44 ` [PATCH 18/18 v2] sched/fair: Take into account slice in EAS Vincent Guittot
2026-10-07 14:36   ` Kayra Cizmeci
2026-10-08 22:53   ` Tim Chen
2026-10-09  6:31     ` Kayra Cizmeci
2026-10-09 14:17     ` Vincent Guittot
2026-10-08 19:12 ` [PATCH 00/18 v2] Improving latency of short slice tasks Kayra Cizmeci
2026-10-09 14:56   ` Vincent Guittot

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=4976fcef-29ec-43fd-8655-32874720ee73@linux.ibm.com \
    --to=sshegde@linux.ibm.com \
    --cc=arighi@nvidia.com \
    --cc=bsegall@google.com \
    --cc=changwoo@igalia.com \
    --cc=christian.loehle@arm.com \
    --cc=dietmar.eggemann@arm.com \
    --cc=juri.lelli@redhat.com \
    --cc=kprateek.nayak@amd.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=lukasz.luba@arm.com \
    --cc=mgorman@suse.de \
    --cc=mingo@redhat.com \
    --cc=peterz@infradead.org \
    --cc=pierre.gondois@arm.com \
    --cc=qyousef@layalina.io \
    --cc=rafael@kernel.org \
    --cc=rostedt@goodmis.org \
    --cc=sched-ext@lists.linux.dev \
    --cc=tj@kernel.org \
    --cc=vincent.guittot@linaro.org \
    --cc=void@manifault.com \
    --cc=vschneid@redhat.com \
    /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

all inboxes | Powered by JetHome®