linux-arch.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Waiman Long <waiman.long@hp.com>
To: George Spelvin <linux@horizon.com>
Cc: JBeulich@novell.com, linix-kernel@vger.kernel.org,
	linux-arch@vger.kernel.org, mingo@kernel.org, tglx@linutronix.de
Subject: Re: [PATCH RFC 1/2] qrwlock: A queue read/write lock implementation
Date: Thu, 18 Jul 2013 09:43:54 -0400	[thread overview]
Message-ID: <51E7F11A.2040301@hp.com> (raw)
In-Reply-To: <20130718125501.2620.qmail@science.horizon.com>

On 07/18/2013 08:55 AM, George Spelvin wrote:
> In the interest of more useful Kconfig help, could I recommend the
> following text:
>
> config QUEUE_RWLOCK
> 	bool "Generic queue read/write lock"
> 	depends on ARCH_QUEUE_RWLOCK
> 	help
> 	  Use an alternative reader-writer lock (rwlock) implementation,
> 	  optimized for larger NUMA systems.  These locks use more memory,
> 	  but perform better under high contention.  (Specifically, readers
> 	  waiting for a writer to release the lock will be queued rather
> 	  than all spinning on the same cache line.)
>
> 	  The kernel will operate correctly either way; this only
> 	  affects performance.
>
> 	  For common desktop and server systems systems with only one
> 	  or two CPU sockets, the performance benefits are not worth
> 	  the additional memory; say N here.
>
> My goal is to give someone stumbling across this question for the first
> time in "make oldconfig" the information htey need to answer it.

Thank for the revision, I will make such a change in the next version of 
my patch.

> That said, I think Ingo's idea for simplfying the waiting reader side
> is excellent and should be tried before bifurcating the implementation.
>
> Looking at the lock system, it *seems* like that patch to __read_lock_failed
> is literally the *only* thing that needs changing, since the write
> lock/unlock is all done with relative add/sub anyway.  But I keep thinking
> "there must have been a reason why it wasn't done that way in the first
> place".

As I said in my response to Ingo, that change will make the lock more 
unfair to the writers. However, I can run some tests to find out the 
performance impact of such a way on the benchmarks that I used.

Regards,
Longman

  reply	other threads:[~2013-07-18 13:51 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-07-18 12:55 [PATCH RFC 1/2] qrwlock: A queue read/write lock implementation George Spelvin
2013-07-18 13:43 ` Waiman Long [this message]
2013-07-18 18:46   ` George Spelvin
2013-07-19 15:43     ` Waiman Long
2013-07-19 21:11       ` George Spelvin
2013-07-19 21:35         ` Waiman Long
  -- strict thread matches above, loose matches on Subject: below --
2013-07-13  1:34 [PATCH RFC 0/2] qrwlock: Introducing a " Waiman Long
2013-07-13  1:34 ` [PATCH RFC 1/2] qrwlock: A " Waiman Long
2013-07-15 14:39   ` Steven Rostedt
2013-07-15 20:44     ` Waiman Long
2013-07-15 22:31   ` Thomas Gleixner
2013-07-16  1:19     ` Waiman Long
2013-07-18  7:42       ` Ingo Molnar
2013-07-18  7:42         ` Ingo Molnar
2013-07-18 13:40         ` Waiman Long
2013-07-18 13:40           ` Waiman Long
2013-07-19  8:40           ` Ingo Molnar
2013-07-19  8:40             ` Ingo Molnar
2013-07-19 15:30             ` Waiman Long
2013-07-19 15:30               ` Waiman Long
2013-07-22 10:34               ` Ingo Molnar
2013-07-22 10:34                 ` Ingo Molnar
2013-07-24  0:03                 ` Waiman Long
2013-07-24  0:03                   ` Waiman Long
2013-07-18 10:22       ` Thomas Gleixner
2013-07-18 14:19         ` Waiman Long
2013-07-21  5:42           ` Raghavendra K T
2013-07-21  5:42             ` Raghavendra K T
2013-07-23 23:54             ` Waiman Long
2013-07-23 23:54               ` Waiman Long

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=51E7F11A.2040301@hp.com \
    --to=waiman.long@hp.com \
    --cc=JBeulich@novell.com \
    --cc=linix-kernel@vger.kernel.org \
    --cc=linux-arch@vger.kernel.org \
    --cc=linux@horizon.com \
    --cc=mingo@kernel.org \
    --cc=tglx@linutronix.de \
    /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;
as well as URLs for NNTP newsgroup(s).