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)
>>> {
>>> -BUILD_BUG_O
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 + 1)
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);
> +BUILD_BUG_ON(
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. Th