From: Andrew Cooper <andrew.cooper3@citrix.com>
To: Jan Beulich <JBeulich@suse.com>,
David Vrabel <david.vrabel@citrix.com>,
Malcolm Crossley <malcolm.crossley@citrix.com>
Cc: KeirFraser <keir@xen.org>, IanCampbell <ian.campbell@citrix.com>,
Christoph Egger <chegger@amazon.de>, Tim Deegan <tim@xen.org>,
Matt Wilson <msw@amazon.com>,
xen-devel@lists.xenproject.org
Subject: Re: [PATCHv6 5/5] gnttab: use per-VCPU maptrack free lists
Date: Fri, 24 Apr 2015 11:02:01 +0100 [thread overview]
Message-ID: <553A1499.4050708@citrix.com> (raw)
In-Reply-To: <553A2E0D0200007800075869@mail.emea.novell.com>
On 24/04/15 10:50, Jan Beulich wrote:
>>>> On 24.04.15 at 11:09, <malcolm.crossley@citrix.com> wrote:
>> On 23/04/15 17:11, Jan Beulich wrote:
>>>>>> On 22.04.15 at 18:00, <david.vrabel@citrix.com> wrote:
>>>> --- a/xen/include/xen/grant_table.h
>>>> +++ b/xen/include/xen/grant_table.h
>>>> @@ -60,6 +60,8 @@ struct grant_mapping {
>>>> u32 ref; /* grant ref */
>>>> u16 flags; /* 0-4: GNTMAP_* ; 5-15: unused */
>>>> domid_t domid; /* granting domain */
>>>> + u32 vcpu; /* vcpu which created the grant mapping */
>>>> + u16 pad[2];
>>>> };
>>> What is this pad[] good for?
>> The pad is to keep the struct power of 2 sized because this allows the
>> compiler to optimise these macro's to right and left shifts:
>>
>> #define MAPTRACK_PER_PAGE (PAGE_SIZE / sizeof(struct grant_mapping))
>> #define maptrack_entry(t, e) \
>> ((t)->maptrack[(e)/MAPTRACK_PER_PAGE][(e)%MAPTRACK_PER_PAGE])
> Okay, then why u16[2] instead of u32? And please add a brief
> comment explaining the reason.
Most likely because vcpu was a u16 in the first draft, and got bumped
during internal review.
>
> Apart from that I wonder whether fitting vcpu in the 10 unused
> flags bits (not 11, as the comment on the field suggests) would be
> an option. That would require limiting vCPU count to 4k, which I
> don't think would really be a problem for anyone.
8k VCPU PV guests do function, and are very good at finding scalability
limits.
It would be nice not to break this.
~Andrew
next prev parent reply other threads:[~2015-04-24 10:02 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-04-22 16:00 [PATCHv6 0/6] gnttab: Improve scaleability David Vrabel
2015-04-22 16:00 ` [PATCHv6 1/5] gnttab: add locking documentation David Vrabel
2015-04-22 16:00 ` [PATCHv6 2/5] gnttab: introduce per-active entry locks David Vrabel
2015-04-23 12:42 ` Jan Beulich
2015-04-23 13:49 ` David Vrabel
2015-04-22 16:00 ` [PATCHv6 3/5] gnttab: split grant table lock into table and maptrack locks David Vrabel
2015-04-23 15:04 ` Jan Beulich
2015-04-29 10:53 ` David Vrabel
2015-04-29 11:12 ` Jan Beulich
2015-04-22 16:00 ` [PATCHv6 4/5] gnttab: remove unnecessary grant table locks David Vrabel
2015-04-23 11:23 ` Tim Deegan
2015-04-23 15:31 ` Jan Beulich
2015-04-22 16:00 ` [PATCHv6 5/5] gnttab: use per-VCPU maptrack free lists David Vrabel
2015-04-23 16:11 ` Jan Beulich
2015-04-23 16:29 ` David Vrabel
2015-04-24 6:44 ` Jan Beulich
2015-04-24 9:09 ` Malcolm Crossley
2015-04-24 9:50 ` Jan Beulich
2015-04-24 10:02 ` Andrew Cooper [this message]
2015-04-24 10:21 ` Malcolm Crossley
2015-04-24 12:52 ` 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=553A1499.4050708@citrix.com \
--to=andrew.cooper3@citrix.com \
--cc=JBeulich@suse.com \
--cc=chegger@amazon.de \
--cc=david.vrabel@citrix.com \
--cc=ian.campbell@citrix.com \
--cc=keir@xen.org \
--cc=malcolm.crossley@citrix.com \
--cc=msw@amazon.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.