All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Vrabel <david.vrabel@citrix.com>
To: Jan Beulich <JBeulich@suse.com>, Tim Deegan <tim@xen.org>
Cc: xen-devel <xen-devel@lists.xenproject.org>,
	Malcolm Crossley <malcolm.crossley@citrix.com>,
	Keir Fraser <keir@xen.org>,
	Ian Campbell <ian.campbell@citrix.com>
Subject: Re: [PATCHv11 4/4] gnttab: use per-VCPU maptrack free lists
Date: Fri, 5 Jun 2015 16:55:24 +0100	[thread overview]
Message-ID: <5571C66C.5010403@citrix.com> (raw)
In-Reply-To: <5571D3860200007800081756@mail.emea.novell.com>

On 05/06/15 15:51, Jan Beulich wrote:
>>>> On 02.06.15 at 18:26, <david.vrabel@citrix.com> wrote:
>> Performance analysis of aggregate network throughput with many VMs
>> shows that performance is signficantly limited by contention on the
>> maptrack lock when obtaining/releasing maptrack handles from the free
>> list.
>>
>> Instead of a single free list use a per-VCPU list. This avoids any
>> contention when obtaining a handle.  Handles must be released back to
>> their original list and since this may occur on a different VCPU there
>> is some contention on the destination VCPU's free list tail pointer
>> (but this is much better than a per-domain lock).
>>
>> Increase the default maximum number of maptrack frames by 4 times
>> because: a) struct grant_mapping is now 16 bytes (instead of 8); and
>> b) a guest may not evenly distribute all the grant map operations
>> across the VCPUs (meaning some VCPUs need more maptrack entries than
>> others).
>>
>> Signed-off-by: Malcolm Crossley <malcolm.crossley@citrix.com>
>> Signed-off-by: David Vrabel <david.vrabel@citrix.com>
>> Acked-by: Tim Deegan <tim@xen.org>
> 
> What version was that ack given for?

v9

>> +    /*
>> +     * max_maptrack_frames is per domain so each VCPU gets a share of
>> +     * the maximum, but allow at least one frame per VCPU.
>> +     */
>> +    if ( v->maptrack_frames
>> +         && v->maptrack_frames >= max_maptrack_frames / v->domain->max_vcpus )
>> +        return -1;
> 
> So with e.g. max_maptrack_frames being 256 and ->max_vcpus
> being 129 you'd potentially allow each vCPU to only have exactly
> one page despite there being 127 more to use.

There's a limit to how many wacky combinations we can support with a
single default limit.

With the standard defaults and 129 VCPUs:

Before

131072 entries (256 * 4096 / 8)

After

231168 entries (1024 / 129 * 129 * 4096 / 16)
  1792 entries per vcpu.

David

  reply	other threads:[~2015-06-05 15:55 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-02 16:26 [PATCHv11 0/4] gnttab: Improve scaleability David Vrabel
2015-06-02 16:26 ` [PATCHv11 1/4] gnttab: per-active entry locking David Vrabel
2015-06-05 13:32   ` Jan Beulich
2015-06-05 13:41     ` David Vrabel
2015-06-05 14:37       ` Jan Beulich
2015-06-02 16:26 ` [PATCHv11 2/4] gnttab: introduce maptrack lock David Vrabel
2015-06-05 13:35   ` Jan Beulich
2015-06-05 13:44     ` David Vrabel
2015-06-05 14:38       ` Jan Beulich
2015-06-05 14:41         ` David Vrabel
2015-06-02 16:26 ` [PATCHv11 3/4] gnttab: make the grant table lock a read-write lock David Vrabel
2015-06-05 14:34   ` Jan Beulich
2015-06-05 14:39     ` David Vrabel
2015-06-02 16:26 ` [PATCHv11 4/4] gnttab: use per-VCPU maptrack free lists David Vrabel
2015-06-03  9:00   ` David Vrabel
2015-06-05 14:51   ` Jan Beulich
2015-06-05 15:55     ` David Vrabel [this message]
2015-06-05 16:11       ` Jan Beulich
2015-06-05 16:42         ` David Vrabel
2015-06-08  6:54           ` Jan Beulich
2015-06-11 15:28     ` Tim Deegan
2015-06-12  7:00       ` Jan Beulich

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=5571C66C.5010403@citrix.com \
    --to=david.vrabel@citrix.com \
    --cc=JBeulich@suse.com \
    --cc=ian.campbell@citrix.com \
    --cc=keir@xen.org \
    --cc=malcolm.crossley@citrix.com \
    --cc=tim@xen.org \
    --cc=xen-devel@lists.xenproject.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.