Re: [PATCH v6 7/8] xen/rwlock: raise the number of possible cpus

2024-04-03 Thread Jan Beulich
On 02.04.2024 17:29, Jürgen Groß wrote: > On 02.04.24 16:52, Jan Beulich wrote: >> On 27.03.2024 16:22, Juergen Gross wrote: >>> @@ -36,14 +36,21 @@ void queue_write_lock_slowpath(rwlock_t *lock); >>> >>> static inline bool _is_write_locked_by_me(unsigned int cnts) >>> { >>> -

Re: [PATCH v6 7/8] xen/rwlock: raise the number of possible cpus

2024-04-02 Thread Jürgen Groß
On 02.04.24 16:52, Jan Beulich wrote: On 27.03.2024 16:22, Juergen Gross wrote: @@ -36,14 +36,21 @@ void queue_write_lock_slowpath(rwlock_t *lock); static inline bool _is_write_locked_by_me(unsigned int cnts) { -BUILD_BUG_ON(_QW_CPUMASK < NR_CPUS); +BUILD_BUG_ON((_QW_CPUMASK +

Re: [PATCH v6 7/8] xen/rwlock: raise the number of possible cpus

2024-04-02 Thread Jan Beulich
On 27.03.2024 16:22, Juergen Gross wrote: > @@ -36,14 +36,21 @@ void queue_write_lock_slowpath(rwlock_t *lock); > > static inline bool _is_write_locked_by_me(unsigned int cnts) > { > -BUILD_BUG_ON(_QW_CPUMASK < NR_CPUS); > +BUILD_BUG_ON((_QW_CPUMASK + 1) < NR_CPUS); > +

[PATCH v6 7/8] xen/rwlock: raise the number of possible cpus

2024-03-27 Thread Juergen Gross
The rwlock handling is limiting the number of cpus to 4095 today. The main reason is the use of the atomic_t data type for the main lock handling, which needs 2 bits for the locking state (writer waiting or write locked), 12 bits for the id of a possible writer, and a 12 bit counter for readers.