Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1467308

Re: [RFC PATCH-tip v4 07/10] locking/rwsem: Change RWSEM_WAITING_BIAS for better disambiguation

From Wanpeng Li <kernellwp@gmail.com>
Newsgroups linux.kernel
Subject Re: [RFC PATCH-tip v4 07/10] locking/rwsem: Change RWSEM_WAITING_BIAS for better disambiguation
Date 2016-08-22 04:20 +0200
Message-ID <s8N0d-7V-1@gated-at.bofh.it> (permalink)
References <s7Gka-6XF-49@gated-at.bofh.it> <s7HSW-892-25@gated-at.bofh.it> <s7L0t-1AS-15@gated-at.bofh.it> <s8N0d-7V-3@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


2016-08-20 0:21 GMT+08:00 Waiman Long <waiman.long@hpe.com>:
> On 08/19/2016 01:57 AM, Wanpeng Li wrote:
>>
>> 2016-08-19 5:11 GMT+08:00 Waiman Long<Waiman.Long@hpe.com>:
>>>
>>> When the count value is in between 0 and RWSEM_WAITING_BIAS, there
>>> are 2 possibilities.
>>> Either a writer is present and there is no waiter
>>
>> count = 0xffff0001
>>
>>> or there are waiters and readers. There is no easy way to
>>
>> count = 0xffff000X
>>
>> However, RWSEM_WAITING_BIAS is equal to 0xffff0000, so both these two
>> cases are beyond RWSEM_WAITING_BIAS, right?
>>
>> Regards,
>> Wanpeng Li
>
>
> Perhaps I should make it clear that I am talking from a signed quantity
> point of view (it is an atomic_long_t). So
>
>     RWSEM_WAITING_BIAS < RWSEM_ACTIVE_WRITE_BIAS < 0
>
> Hope this clarify your question.

Yeah, thank you. :)

Regards,
Wanpeng Li

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

[RFC PATCH-tip v4 07/10] locking/rwsem: Change RWSEM_WAITING_BIAS for better disambiguation Waiman Long <Waiman.Long@hpe.com> - 2016-08-19 04:40 +0200
  Re: [RFC PATCH-tip v4 07/10] locking/rwsem: Change RWSEM_WAITING_BIAS  for better disambiguation Wanpeng Li <kernellwp@gmail.com> - 2016-08-19 08:00 +0200
    Re: [RFC PATCH-tip v4 07/10] locking/rwsem: Change RWSEM_WAITING_BIAS  for better disambiguation Wanpeng Li <kernellwp@gmail.com> - 2016-08-22 04:20 +0200

csiph-web