On 12.09.2019 15:42, Juergen Gross wrote:
> On 12.09.19 15:36, Jan Beulich wrote:
>> On 12.09.2019 15:28, Juergen Gross wrote:
>>> @@ -267,6 +288,7 @@ int _spin_trylock_recursive(spinlock_t *lock)
>>>
>>> /* Don't allow overflow of recurse_cpu field. */
>>> BUILD_BUG_ON(NR_CPUS >
On 12.09.19 15:36, Jan Beulich wrote:
On 12.09.2019 15:28, Juergen Gross wrote:
@@ -267,6 +288,7 @@ int _spin_trylock_recursive(spinlock_t *lock)
/* Don't allow overflow of recurse_cpu field. */
BUILD_BUG_ON(NR_CPUS > SPINLOCK_NO_CPU);
+BUILD_BUG_ON(SPINLOCK_RECURSE_BITS <=
On 12.09.2019 15:28, Juergen Gross wrote:
> @@ -267,6 +288,7 @@ int _spin_trylock_recursive(spinlock_t *lock)
>
> /* Don't allow overflow of recurse_cpu field. */
> BUILD_BUG_ON(NR_CPUS > SPINLOCK_NO_CPU);
> +BUILD_BUG_ON(SPINLOCK_RECURSE_BITS <= 0);
This is too weak: While I
Add the cpu currently holding the lock to struct lock_debug. This makes
analysis of locking errors easier and it can be tested whether the
correct cpu is releasing a lock again.
Signed-off-by: Juergen Gross
---
V2:
- adjust types (Jan Beulich)
V4:
- add define for bitfield size to store cpu