[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <bfcb530d-10e4-4ec7-b216-0b54d5089bfc@redhat.com>
Date: Mon, 25 Nov 2024 17:33:50 -0500
From: Waiman Long <llong@...hat.com>
To: Guenter Roeck <linux@...ck-us.net>, Waiman Long <llong@...hat.com>,
Sebastian Andrzej Siewior <bigeasy@...utronix.de>
Cc: sparclinux@...r.kernel.org, linux-kernel@...r.kernel.org,
Boqun Feng <boqun.feng@...il.com>, Ingo Molnar <mingo@...hat.com>,
Peter Zijlstra <peterz@...radead.org>, Thomas Gleixner <tglx@...utronix.de>,
Will Deacon <will@...nel.org>, "David S. Miller" <davem@...emloft.net>,
Andreas Larsson <andreas@...sler.com>
Subject: Re: [PATCH] sparc/pci: Make pci_poke_lock a raw_spinlock_t.
On 11/25/24 4:54 PM, Guenter Roeck wrote:
> On 11/25/24 13:29, Waiman Long wrote:
>>
>> 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.
>>
>
> No architecture will be able to enable anything because "bool" has no
> string associated with it. As mentioned before, it is all or nothing.
> Otherwise I could just configure "CONFIG_PROVE_RAW_LOCK_NESTING=n"
> for sparc and be done.
Yes, you are right.
Cheers,
Longman
Powered by blists - more mailing lists