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 <= 0);
This is too weak: While I don't think we strictly need 15 levels of
recursion, I also don't think we'll get away with just 1. I think
this minimally needs to be "<= 1", perhaps better "<= 2". Other
thoughts (also by others) on the precise value to use here
appreciated. With this suitably taken care of (which can happen
while committing, but must not be forgotten)
Reviewed-by: Jan Beulich <jbeul...@suse.com>
"2" should be no problem, as the other added

BUILD_BUG_ON(LOCK_DEBUG_PAD_BITS·<=·0);

is implying that already.


Juergen

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

Reply via email to