[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <871pl1y3oh.fsf@yellow.woof>
Date: Thu, 11 Dec 2025 14:42:54 +0900
From: Nam Cao <namcao@...utronix.de>
To: Yunseong Kim <ysk@...lloc.com>, Gabriele Monaco <gmonaco@...hat.com>
Cc: Sebastian Andrzej Siewior <bigeasy@...utronix.de>, rostedt@...dmis.org,
Tomas Glozar <tglozar@...hat.com>, Shung-Hsi Yu <shung-hsi.yu@...e.com>,
Byungchul Park <byungchul@...com>, syzkaller@...glegroups.com,
linux-rt-devel@...ts.linux.dev, LKML <linux-kernel@...r.kernel.org>, Dan
Carpenter <dan.carpenter@...aro.org>
Subject: Re: [Question] Detecting Sleep-in-Atomic Context in PREEMPT_RT via
RV (Runtime Verification) monitor rtapp:sleep
Yunseong Kim <ysk@...lloc.com> writes:
> I specifically believe that RV can encompass the role of
> CONFIG_DEBUG_ATOMIC_SLEEP and even go beyond it.
>
> My reasoning is that even if a sleepable (PREEMPT_RT) spinlock is used
> within an IRQ/preemption disabled section, CONFIG_DEBUG_ATOMIC_SLEEP
> might not trigger a warning if scheduling does not actually occur (i.e.,
> if there is no contention for that spinlock). This is because the actual
> debugging check happens in __might_resched().
That's not how it works. See the description of CONFIG_DEBUG_ATOMIC_SLEEP:
"If you say Y here, various routines which may sleep will become very
noisy if they are called inside atomic sections: when a spinlock is
held, inside an rcu read side critical section, inside preempt disabled
sections, inside an interrupt, etc..."
Nam
Powered by blists - more mailing lists