mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Suresh Siddha <suresh.b.siddha@intel.com>
To: Robin Holt <holt@sgi.com>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	"Pallipadi, Venkatesh" <venkatesh.pallipadi@intel.com>,
	"H. Peter Anvin" <hpa@zytor.com>
Subject: Re: [patch 1/1] Replace the memtype_lock spinlock with an rwlock.
Date: Fri, 26 Feb 2010 16:52:59 -0800	[thread overview]
Message-ID: <1267231979.2720.25.camel@sbs-t61> (raw)
In-Reply-To: <20100226174319.537341172@gulag1.americas.sgi.com>

On Fri, 2010-02-26 at 09:42 -0800, Robin Holt wrote:
> While testing an application using the xpmem (out of kernel driver), we
> noticed a significant page fault rate reduction of x86_64 with respect
> to ia64.  For one test running with 256 cpus, one thread per cpu, it
> took one minute, eight seconds for each of the threads to vm_insert_pfn
> 2GB worth of pages.
> 
> The slowdown was tracked to lookup_memtype which acquires the spinlock
> memtype_lock.  This heavily contended lock was slowing down fault time.
> 
> I quickly converted the spinlock to an rwlock.  This greatly improved
> vm_insert_pfn time to 4.3 seconds for the above test.

Acked-by: Suresh Siddha <suresh.b.siddha@intel.com>

> As a theoretical test, I removed the lock around get_page_memtype to see
> what the full impact of the single shared lock actually was.  With that
> change, the vm_insert_pfn time dropped to 1.6 seconds.
> 
> I do not think the current global lock to protect individual pages is
> the "correct" method for protecting get/set of the page_memtype flag.
> It seems like the locking should be located within the function that
> gets and sets the flags and be locked by a per-page lock or protected
> with an atomic update.

I agree. Will you be willing to look into this and post a patch? Or else
I can look at this and post a fix next week.

thanks,
suresh


      reply	other threads:[~2010-02-27  0:54 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20100226174256.003433508@gulag1.americas.sgi.com>
2010-02-26 17:42 ` Robin Holt
2010-02-27  0:52   ` Suresh Siddha [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=1267231979.2720.25.camel@sbs-t61 \
    --to=suresh.b.siddha@intel.com \
    --cc=holt@sgi.com \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=venkatesh.pallipadi@intel.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

all inboxes | Powered by JetHome®