sparclinux.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Waiman Long <llong@redhat.com>
To: Guenter Roeck <linux@roeck-us.net>,
	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>,
	Andreas Larsson <andreas@gaisler.com>
Subject: Re: [PATCH] sparc/pci: Make pci_poke_lock a raw_spinlock_t.
Date: Mon, 25 Nov 2024 16:29:06 -0500	[thread overview]
Message-ID: <42effdc0-bfe7-49a5-a872-21a6f665fff3@redhat.com> (raw)
In-Reply-To: <b0e13a75-d068-4ad3-b0d7-4834ccec3d5a@roeck-us.net>


On 11/25/24 4:25 PM, Guenter Roeck wrote:
> On 11/25/24 12:54, Waiman Long wrote:
>>
>> On 11/25/24 3:23 PM, Guenter Roeck wrote:
>>> On 11/25/24 12:06, Guenter Roeck wrote:
>>>> On 11/25/24 11:33, Waiman Long wrote:
>>>> [ ... ]
>>>>>> Fixing that finally gives me a clean run. Nevertheless, that 
>>>>>> makes me wonder:
>>>>>> Should I just disable CONFIG_PROVE_RAW_LOCK_NESTING for sparc 
>>>>>> runtime tests ?
>>>>>
>>>>> If no one is tryng to ever enable PREEMPT_RT on SPARC, I suppose 
>>>>> you could disable CONFIG_PROVE_RAW_LOCK_NESTING to avoid the trouble.
>>>>>
>>>>
>>>> SGTM. I'll do that unless someone gives me a good reason to keep it 
>>>> enabled.
>>>>
>>>
>>> Actually it can not be disabled with a configuration flag. It is
>>> automatically enabled. I'll have to disable PROVE_LOCKING to disable 
>>> it.
>>>
>>> config PROVE_RAW_LOCK_NESTING
>>>         bool                    <---- no longer user configurable
>>>         depends on PROVE_LOCKING
>>>         default y
>>>         help
>>>          Enable the raw_spinlock vs. spinlock nesting checks which 
>>> ensure
>>>          that the lock nesting rules for PREEMPT_RT enabled kernels are
>>>          not violated.
>>>
>>> I don't really like that, and I don't understand the logic behind it,
>>> but it is what it is.
>>>
>>> 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?
>>
>
>     depends on PROVE_LOCKING && ARCH_SUPPORTS_RT
>
> seems to make more sense to me.

That will work too, but that will enforce that arches with no 
ARCH_SUPPORTS_RT will not be able to enable PROVE_RAW_LOCK_NESTING even 
if people want to try it out.

Cheers,
Longman


  reply	other threads:[~2024-11-25 21:29 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20241009161041.1018375-1-bigeasy@linutronix.de>
     [not found] ` <20241009161041.1018375-2-bigeasy@linutronix.de>
     [not found]   ` <7656395b-58fc-4874-a9f3-6d934e2ef7ee@roeck-us.net>
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 [this message]
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
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=42effdc0-bfe7-49a5-a872-21a6f665fff3@redhat.com \
    --to=llong@redhat.com \
    --cc=andreas@gaisler.com \
    --cc=bigeasy@linutronix.de \
    --cc=boqun.feng@gmail.com \
    --cc=davem@davemloft.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@roeck-us.net \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).