mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Waiman Long <longman@redhat.com>
To: John Stultz <jstultz@google.com>
Cc: Peter Zijlstra <peterz@infradead.org>,
	Ingo Molnar <mingo@redhat.com>, Will Deacon <will.deacon@arm.com>,
	Boqun Feng <boqun.feng@gmail.com>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] locking/semaphore: Use wake_q to wake up processes outside lock critical section
Date: Wed, 20 Sep 2023 20:37:09 -0400	[thread overview]
Message-ID: <75c8dce2-0b66-0d5a-3e95-fb6e0a248597@redhat.com> (raw)
In-Reply-To: <CANDhNCpsDbz9ZT+h4Zcq-7QMJ-uqs3rW+MXCVcbi2A2hnTjBpQ@mail.gmail.com>

On 9/20/23 20:05, John Stultz wrote:
> On Fri, Sep 9, 2022 at 12:28 PM Waiman Long <longman@redhat.com> wrote:
>> It was found that a circular lock dependency can happen with the
>> following locking sequence:
>>
>>     +--> (console_sem).lock --> &p->pi_lock --> &rq->__lock --+
>>     |                                                         |
>>     +---------------------------------------------------------+
>>
>> The &p->pi_lock --> &rq->__lock sequence is very common in all the
>> task_rq_lock() calls.
> Thanks for sending this out! I've been hitting these lockdep warningns
> a lot recently, particularly if I have any debug printks/WARN_ONs in
> the scheduler that trip, so I'm eager to get a fix for this!
>
> That said, running with your patch, I'm seeing bootup hang pretty
> close to where init starts when I've had a fair amount of debug
> printks go off. It's odd because the lockup detectors don't seem to
> fire.
> I'll try to debug further, but wanted to give you a heads up. Let me
> know if you have any suggestions.

Thanks for testing this patch. This was not merged because Peter thought 
the merging of atomic console would probably make this not an issue at 
all. We are close to getting the atomic console merged. Let's see if 
this is really the case.

Cheers,
Longman


  reply	other threads:[~2023-09-21  0:38 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-09 19:28 Waiman Long
2022-09-19 19:49 ` Waiman Long
2023-09-21  0:05 ` John Stultz
2023-09-21  0:37   ` Waiman Long [this message]
2023-09-21  7:45   ` Peter Zijlstra
2023-09-21  7:42 ` Peter Zijlstra
2023-09-22 18:45   ` Waiman Long
2023-09-22 19:47     ` Peter Zijlstra
2023-09-23  0:29       ` Waiman Long
  -- strict thread matches above, loose matches on Subject: below --
2025-01-22 19:17 Waiman Long
2025-01-26  2:21 ` Waiman Long
2022-02-10 18:10 Waiman Long

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=75c8dce2-0b66-0d5a-3e95-fb6e0a248597@redhat.com \
    --to=longman@redhat.com \
    --cc=boqun.feng@gmail.com \
    --cc=jstultz@google.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=peterz@infradead.org \
    --cc=will.deacon@arm.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®