All of lore.kernel.org
 help / color / mirror / Atom feed
From: Keir Fraser <keir.xen@gmail.com>
To: Jan Beulich <JBeulich@suse.com>
Cc: tupeng212 <tupeng212@gmail.com>, xen-devel <xen-devel@lists.xen.org>
Subject: Re: alloc_heap_pages is low efficient with more CPUs
Date: Tue, 16 Oct 2012 09:03:17 +0100	[thread overview]
Message-ID: <CCA2D355.41C3C%keir.xen@gmail.com> (raw)
In-Reply-To: <507D2E2902000078000A19B7@nat28.tlf.novell.com>

On 16/10/2012 08:51, "Jan Beulich" <JBeulich@suse.com> wrote:

>>>> On 15.10.12 at 17:45, Keir Fraser <keir@xen.org> wrote:
>> On 15/10/2012 14:27, "tupeng212" <tupeng212@gmail.com> wrote:
>> 
>>> Please try the attached patch.
>>> : Great!  you have done a good job, needless time decreases badly to 1s.
>>>  
>>> If anybody has no proposal, I suggest you to commit this patch.
>> 
>> I have applied it to xen-unstable. It probably makes sense to put it in 4.1
>> and 4.2 as well (cc'ed Jan, and attaching the backport for 4.1 again).
> 
> Will do, but do you have an explanation how this simple, memory
> only operation (64 CPUs isn't that many) has this dramatic an
> effect on performance. Are we bouncing cache lines this badly? If
> so, which one(s)? I don't see what would be written frequently
> from multiple CPUs here - tlbflush_filter() itself only reads global
> variables, but never writes them.

It's just the small factors multiplying up. A 40G domain is 10M page
allocations, each of which does 64x per-cpu cpumask bitops and timestamp
compares. That's going on for a billion (10^9) times round
tlbflush_filter()s loop. Each iteration need only take a few CPU cycles for
the effect to actually be noticeable. If the stuff being touched were not in
the cache (which of course it is, since this path is so hot and not touching
much memory) it would probably take an hour to create the domain!

 -- Keir

> Jan
> 

  reply	other threads:[~2012-10-16  8:03 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CC9EC91B.41A16%keir.xen@gmail.com>
2012-10-13  6:46 ` alloc_heap_pages is low efficient with more CPUs tupeng212
2012-10-13  8:59   ` Keir Fraser
2012-10-15 13:27     ` tupeng212
2012-10-15 15:45       ` Keir Fraser
2012-10-16  7:51         ` Jan Beulich
2012-10-16  8:03           ` Keir Fraser [this message]
2012-10-16  8:28             ` Jan Beulich
2012-10-16  8:53               ` Keir Fraser
2012-10-11 15:18 tupeng212
2012-10-11 15:41 ` Keir Fraser
2012-10-12 12:24   ` tupeng212
2012-10-12 22:39     ` Mukesh Rathor
2012-10-13  6:03       ` Keir Fraser
2012-10-13  7:20         ` tupeng212
2012-10-13  8:59           ` Keir Fraser

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=CCA2D355.41C3C%keir.xen@gmail.com \
    --to=keir.xen@gmail.com \
    --cc=JBeulich@suse.com \
    --cc=tupeng212@gmail.com \
    --cc=xen-devel@lists.xen.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.