Re: [PATCH v4 10/12] xen/spinlock: split recursive spinlocks from normal ones

2024-03-03 Thread Jürgen Groß
On 04.03.24 08:25, Jan Beulich wrote: On 01.03.2024 15:37, Juergen Gross wrote: On 29.02.24 16:32, Jan Beulich wrote: On 12.12.2023 10:47, Juergen Gross wrote: +#define nrspin_lock_irqsave(l, f) \ +({ \

Re: [PATCH v4 10/12] xen/spinlock: split recursive spinlocks from normal ones

2024-03-03 Thread Jan Beulich
On 01.03.2024 15:37, Juergen Gross wrote: > On 29.02.24 16:32, Jan Beulich wrote: >> On 12.12.2023 10:47, Juergen Gross wrote: >>> +#define nrspin_lock_irqsave(l, f) \ >>> +({ \ >>> +

Re: [PATCH v4 10/12] xen/spinlock: split recursive spinlocks from normal ones

2024-03-01 Thread Juergen Gross
On 29.02.24 16:32, Jan Beulich wrote: On 12.12.2023 10:47, Juergen Gross wrote: +#define nrspin_lock_irqsave(l, f) \ +({ \ +BUILD_BUG_ON(sizeof(f) != sizeof(unsigned long)); \ +((f)

Re: [PATCH v4 10/12] xen/spinlock: split recursive spinlocks from normal ones

2024-02-29 Thread Jürgen Groß
On 29.02.24 16:32, Jan Beulich wrote: On 12.12.2023 10:47, Juergen Gross wrote: --- a/xen/common/spinlock.c +++ b/xen/common/spinlock.c @@ -541,6 +541,55 @@ void rspin_unlock_irqrestore(rspinlock_t *lock, unsigned long flags) local_irq_restore(flags); } +int

Re: [PATCH v4 10/12] xen/spinlock: split recursive spinlocks from normal ones

2024-02-29 Thread Jan Beulich
On 12.12.2023 10:47, Juergen Gross wrote: > --- a/xen/common/spinlock.c > +++ b/xen/common/spinlock.c > @@ -541,6 +541,55 @@ void rspin_unlock_irqrestore(rspinlock_t *lock, unsigned > long flags) > local_irq_restore(flags); > } > > +int nrspin_trylock(rspinlock_t *lock) > +{ > +

[PATCH v4 10/12] xen/spinlock: split recursive spinlocks from normal ones

2023-12-12 Thread Juergen Gross
Recursive and normal spinlocks are sharing the same data structure for representation of the lock. This has two major disadvantages: - it is not clear from the definition of a lock, whether it is intended to be used recursive or not, while a mixture of both usage variants needs to be - in