mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Peter Zijlstra <peterz@infradead.org>
To: Suresh Siddha <suresh.b.siddha@intel.com>
Cc: "H. Peter Anvin" <hpa@zytor.com>, "holt@sgi.com" <holt@sgi.com>,
	Ingo Molnar <mingo@redhat.com>,
	Thomas Gleixner <tglx@linutronix.de>,
	Venkatesh Pallipadi <venkatesh.pallipadi@gmail.com>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	"x86@kernel.org" <x86@kernel.org>
Subject: Re: [patch 2/2] x86,pat Convert memtype_lock into an rw_lock.
Date: Wed, 24 Mar 2010 17:36:59 +0100	[thread overview]
Message-ID: <1269448619.5109.443.camel@twins> (raw)
In-Reply-To: <1269447146.2881.0.camel@sbs-t61.sc.intel.com>

On Wed, 2010-03-24 at 09:12 -0700, Suresh Siddha wrote:
> On Wed, 2010-03-24 at 04:32 -0700, Peter Zijlstra wrote:
> > On Wed, 2010-03-17 at 16:19 -0800, Suresh Siddha wrote:
> > > On Wed, 2010-03-17 at 12:51 -0700, H. Peter Anvin wrote:
> > > > Well, as you know :) tglx and I are on the road ... I'll try to get to it on Friday before I take off again.
> > > 
> > > Also I talked to Thomas about this rwlock conversion and he referred to
> > > RT issues with rwlock. And the best is to avoid this using RCU.
> > 
> > Its not just RT, even for mainline rwlock_t is a massive pain and often
> > is no better (actually worse) than a spinlock due to the massive
> > cacheline bouncing it introduces.
> 
> Don't we have the same cacheline bouncing issues with the ticket
> spinlocks?

Sure, but the rwlock_t is unfair and can degrade into much worse
performance than the spinlock.

Thing is, rwlock_t needs to write to the cacheline for each read
acquire, so unless the hold time is much-much longer than the cacheline
bounce time, its just not worth it, but since its a rwlock_t it should
be have short hold time, hence its a useless construct :-)



  reply	other threads:[~2010-03-24 16:37 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-17 19:51 H. Peter Anvin
2010-03-18  0:19 ` Suresh Siddha
2010-03-24 11:32   ` Peter Zijlstra
2010-03-24 16:12     ` Suresh Siddha
2010-03-24 16:36       ` Peter Zijlstra [this message]
  -- strict thread matches above, loose matches on Subject: below --
2010-03-24  0:36 [patch 0/2] x86,pat: Reduce contention on the memtype_lock -V4 holt
2010-03-24  0:36 ` [patch 2/2] x86,pat Convert memtype_lock into an rw_lock holt
2010-03-15 13:21 [patch 0/2] x86,pat: Reduce contention on the memtype_lock -V3 holt
2010-03-15 13:21 ` [patch 2/2] x86,pat Convert memtype_lock into an rw_lock holt
2010-03-17 16:21   ` Suresh Siddha

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=1269448619.5109.443.camel@twins \
    --to=peterz@infradead.org \
    --cc=holt@sgi.com \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=suresh.b.siddha@intel.com \
    --cc=tglx@linutronix.de \
    --cc=venkatesh.pallipadi@gmail.com \
    --cc=x86@kernel.org \
    /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

all inboxes | Powered by JetHome®