From: Waiman Long <waiman.long@hp.com>
To: Jason Low <jason.low2@hp.com>
Cc: Peter Zijlstra <peterz@infradead.org>,
Ingo Molnar <mingo@kernel.org>,
linux-kernel@vger.kernel.org,
Scott J Norton <scott.norton@hp.com>,
Douglas Hatch <doug.hatch@hp.com>
Subject: Re: [PATCH] locking/rwsem: reduce spinlock contention in wakeup after up_read/up_write
Date: Wed, 22 Apr 2015 16:19:23 -0400 [thread overview]
Message-ID: <5538024B.9040109@hp.com> (raw)
In-Reply-To: <1429561424.8820.24.camel@j-VirtualBox>
On 04/20/2015 04:23 PM, Jason Low wrote:
> On Fri, 2015-04-17 at 22:03 -0400, Waiman Long wrote:
>
>> diff --git a/include/linux/osq_lock.h b/include/linux/osq_lock.h
>> index 3a6490e..703ea5c 100644
>> --- a/include/linux/osq_lock.h
>> +++ b/include/linux/osq_lock.h
>> @@ -32,4 +32,9 @@ static inline void osq_lock_init(struct optimistic_spin_queue *lock)
>> extern bool osq_lock(struct optimistic_spin_queue *lock);
>> extern void osq_unlock(struct optimistic_spin_queue *lock);
>>
>> +static inline bool osq_is_locked(struct optimistic_spin_queue *lock)
>> +{
>> + return atomic_read(&lock->tail) != OSQ_UNLOCKED_VAL;
>> +}
> Would it be better to separate the addition of osq_is_locked() into its
> own patch, since this can be useful for other situations and isn't just
> specific to the rwsem optimization.
>
I think the osq_lock.h change is too simple and straight forward to
warrant a separate patch.
Cheers,
Longman
prev parent reply other threads:[~2015-04-22 20:19 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-04-18 2:03 [PATCH] locking/rwsem: reduce spinlock contention in wakeup after up_read/up_write Waiman Long
2015-04-18 15:40 ` Peter Zijlstra
2015-04-23 18:41 ` Waiman Long
2015-04-20 20:23 ` Jason Low
2015-04-22 20:19 ` Waiman Long [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5538024B.9040109@hp.com \
--to=waiman.long@hp.com \
--cc=doug.hatch@hp.com \
--cc=jason.low2@hp.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=peterz@infradead.org \
--cc=scott.norton@hp.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox