All of lore.kernel.org
 help / color / mirror / Atom feed
From: Guenter Roeck <linux@roeck-us.net>
To: Andreas Larsson <andreas@gaisler.com>,
	Waiman Long <llong@redhat.com>,
	Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Cc: sparclinux@vger.kernel.org, linux-kernel@vger.kernel.org,
	Boqun Feng <boqun.feng@gmail.com>, Ingo Molnar <mingo@redhat.com>,
	Peter Zijlstra <peterz@infradead.org>,
	Thomas Gleixner <tglx@linutronix.de>,
	Will Deacon <will@kernel.org>,
	"David S. Miller" <davem@davemloft.net>
Subject: Re: [PATCH] sparc/pci: Make pci_poke_lock a raw_spinlock_t.
Date: Wed, 27 Nov 2024 08:02:50 -0800	[thread overview]
Message-ID: <4eb7bb8e-c2aa-4ce5-9f15-3086fccf4e46@roeck-us.net> (raw)
In-Reply-To: <b698d599-ef4e-4966-92fb-1f84d7a0df75@gaisler.com>

On 11/27/24 07:39, Andreas Larsson wrote:
> On 2024-11-26 17:59, Waiman Long wrote:
>>
>> On 11/26/24 6:20 AM, Sebastian Andrzej Siewior wrote:
>>> On 2024-11-25 15:54:48 [-0500], Waiman Long wrote:
>>>>> FWIW, the description of commit 560af5dc839 is misleading. It says
>>>>> "Enable
>>>>> PROVE_RAW_LOCK_NESTING _by default_" (emphasis mine). That is not what
>>>>> the
>>>>> commit does. It force-enables PROVE_RAW_LOCK_NESTING if PROVE_LOCKING is
>>>>> enabled. It is all or nothing.
>>>>>
>>>> I think we can relax it by
>>>>
>>>> diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug
>>>> index 5d9eca035d47..bfdbd3fa2d29 100644
>>>> --- a/lib/Kconfig.debug
>>>> +++ b/lib/Kconfig.debug
>>>> @@ -1399,7 +1399,7 @@ config PROVE_LOCKING
>>>>    config PROVE_RAW_LOCK_NESTING
>>>>           bool
>>>>           depends on PROVE_LOCKING
>>>> -       default y
>>>> +       default y if ARCH_SUPPORTS_RT
>>>>           help
>>>>            Enable the raw_spinlock vs. spinlock nesting checks which ensure
>>>>            that the lock nesting rules for PREEMPT_RT enabled kernels are
>>>>
>>>> Sebastian, what do you think?
>>> All the changes Guenter proposed make sense and were limited to sparc.
>>> So we could apply that. Limiting the option to the RT architectures
>>> would silence the warnings. If there is no interest in getting RT on
>>> sparc there is probably no interest in getting the lock ordering
>>> straight.
>>> I remember PeterZ did not like the option in the beginning but there was
>>> no way around it especially since printk triggered it on boot.
>>> I'm fine with both solutions (fixing sparc or limiting
>>> PROVE_RAW_LOCK_NESTING). I leave the final judgment to the locking
>>> people.
>>
>> Right now, ARCH_SUPPORTS_RT is defined for most of the major arches
>> where most of the testings are being done. So even if we limit this to
>> just those arches, we will not lose much testing anyway. This does have
>> the advantage of not forcing other legacy arches from doing extra works
>> with no real gain from their point of view.
> 
> Even though this is for sparc64, there is work being done looking into
> enabling RT for sparc32. If the amount of fixes needed to keep
> PROVE_RAW_LOCK_NESTING enabled is quite small at the moment I'd rather
> see it enabled for sparc rather than risking it becoming worse in the
> future.
> 
> I don't know what the situation is for other architectures that does not
> support RT.
> 

For my part I still don't understand why PROVE_RAW_LOCK_NESTING is no longer
a configurable option, or in other words why it is mandated even for architectures
not supporting RT. To me this means that I'll either have to disable PROVE_LOCKING
for sparc or live with endless warning backtraces. The latter obscures real
problems, so it is a no-go.

So, if people want to keep mandating PROVE_RAW_LOCK_NESTING together with
PROVE_LOCKING for all architectures, I'll disable PROVE_LOCKING for sparc
in my testing. NP, just let me know. I'll then do the same for other
architectures not supporting RT if I hit the same problem there.

Guenter


  reply	other threads:[~2024-11-27 16:02 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-09 15:45 [PATCH 0/1] lockdep: Enable PROVE_RAW_LOCK_NESTING with PROVE_LOCKING Sebastian Andrzej Siewior
2024-10-09 15:45 ` [PATCH 1/1] " Sebastian Andrzej Siewior
2024-10-09 16:50   ` Waiman Long
2024-10-09 22:47     ` Boqun Feng
2024-10-22 21:53   ` [tip: locking/core] " tip-bot2 for Sebastian Andrzej Siewior
2024-11-23 16:27   ` [PATCH 1/1] " Guenter Roeck
2024-11-25  8:53     ` [PATCH] sparc/pci: Make pci_poke_lock a raw_spinlock_t Sebastian Andrzej Siewior
2024-11-25 17:01       ` Guenter Roeck
2024-11-25 17:43         ` Sebastian Andrzej Siewior
2024-11-25 17:59           ` Guenter Roeck
2024-11-25 18:12             ` Sebastian Andrzej Siewior
2024-11-25 19:23               ` Guenter Roeck
2024-11-25 19:33                 ` Waiman Long
2024-11-25 20:06                   ` Guenter Roeck
2024-11-25 20:23                     ` Guenter Roeck
2024-11-25 20:54                       ` Waiman Long
2024-11-25 21:25                         ` Guenter Roeck
2024-11-25 21:29                           ` Waiman Long
2024-11-25 21:54                             ` Guenter Roeck
2024-11-25 22:33                               ` Waiman Long
2024-11-26 11:20                         ` Sebastian Andrzej Siewior
2024-11-26 16:59                           ` Waiman Long
2024-11-27 15:39                             ` Andreas Larsson
2024-11-27 16:02                               ` Guenter Roeck [this message]
2024-11-27 16:53                                 ` Sebastian Andrzej Siewior
2024-11-27 17:44                                   ` Guenter Roeck
2024-11-27 23:47                                     ` Waiman Long
2024-11-28  0:08                                       ` Guenter Roeck
2024-11-28  0:31                                         ` Waiman Long
2024-11-28  1:17                                           ` Guenter Roeck
2024-11-28  1:55                                             ` 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=4eb7bb8e-c2aa-4ce5-9f15-3086fccf4e46@roeck-us.net \
    --to=linux@roeck-us.net \
    --cc=andreas@gaisler.com \
    --cc=bigeasy@linutronix.de \
    --cc=boqun.feng@gmail.com \
    --cc=davem@davemloft.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=llong@redhat.com \
    --cc=mingo@redhat.com \
    --cc=peterz@infradead.org \
    --cc=sparclinux@vger.kernel.org \
    --cc=tglx@linutronix.de \
    --cc=will@kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.