mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Waiman Long <longman@redhat.com>
To: Thomas Gleixner <tglx@linutronix.de>,
	Andrew Morton <akpm@linux-foundation.org>,
	Sebastian Andrzej Siewior <bigeasy@linutronix.de>,
	Clark Williams <clrkwllms@kernel.org>,
	Steven Rostedt <rostedt@goodmis.org>
Cc: linux-kernel@vger.kernel.org, linux-rt-devel@lists.linux.dev
Subject: Re: [PATCH] debugobjects: Don't call fill_pool() in early boot non-task context of RT kernel
Date: Wed, 20 May 2026 14:10:20 -0400	[thread overview]
Message-ID: <d2ce1a71-6f8a-404a-9dd0-dfa3d9f68145@redhat.com> (raw)
In-Reply-To: <87qzn6vtxq.ffs@tglx>

On 5/20/26 2:04 PM, Thomas Gleixner wrote:
> On Wed, May 20 2026 at 12:57, Waiman Long wrote:
>> On 5/20/26 12:43 PM, Waiman Long wrote:
>>> It shouldn't really be a problem as fill_poll() will not called from
>>> non-preemptible context after early boot, but the lockdep warning can
>>> still cause confusion and anxiety. Fix that by further restricting the
>>> call to only in_task() context during early boot.
>> Sorry, the above paragraph isn't right. Will send out a v2.
> And please trim the back trace while at it.
OK, will send a v3.
>
>>> Fixes: 06e0ae988f6e ("debugobjects: Allow to refill the pool before SYSTEM_SCHEDULING")
>>> Signed-off-by: Waiman Long <longman@redhat.com>
>>> ---
>>>    lib/debugobjects.c | 7 +++++--
>>>    1 file changed, 5 insertions(+), 2 deletions(-)
>>>
>>> diff --git a/lib/debugobjects.c b/lib/debugobjects.c
>>> index 12e2e42e6a31..236ea5e716df 100644
>>> --- a/lib/debugobjects.c
>>> +++ b/lib/debugobjects.c
>>> @@ -727,11 +727,14 @@ static void debug_objects_fill_pool(void)
>>>    
>>>    	/*
>>>    	 * On RT enabled kernels the pool refill must happen in preemptible
>>> -	 * context -- for !RT kernels we rely on the fact that spinlock_t and
>>> +	 * context or in task context during early boot.
>>> +	 *
>>> +	 * For !RT kernels we rely on the fact that spinlock_t and
>>>    	 * raw_spinlock_t are basically the same type and this lock-type
>>>    	 * inversion works just fine.
>>>    	 */
>>> -	if (!IS_ENABLED(CONFIG_PREEMPT_RT) || preemptible() || system_state < SYSTEM_SCHEDULING) {
>>> +	if (!IS_ENABLED(CONFIG_PREEMPT_RT) || preemptible() ||
>>> +	   (system_state < SYSTEM_SCHEDULING && in_task())) {
> Conflicts with:
>
> https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git/log/?h=core/urgent
>
Will rebase it to tip.

Thanks,
Longman


      reply	other threads:[~2026-05-20 18:10 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-20 16:43 Waiman Long
2026-05-20 16:57 ` Waiman Long
2026-05-20 18:04   ` Thomas Gleixner
2026-05-20 18:10     ` Waiman Long [this message]

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=d2ce1a71-6f8a-404a-9dd0-dfa3d9f68145@redhat.com \
    --to=longman@redhat.com \
    --cc=akpm@linux-foundation.org \
    --cc=bigeasy@linutronix.de \
    --cc=clrkwllms@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rt-devel@lists.linux.dev \
    --cc=rostedt@goodmis.org \
    --cc=tglx@linutronix.de \
    /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®