kvm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Nitesh Narayan Lal <nilal@redhat.com>
To: Rik van Riel <riel@redhat.com>, Pankaj Gupta <pagupta@redhat.com>
Cc: kvm@vger.kernel.org, mst@redhat.com, david@redhat.com,
	yang.zhang.wz@gmail.com, wei.w.wang@intel.com, mst@redhat.com,
	david@redhat.com, yang.zhang.wz@gmail.com, wei.w.wang@intel.com
Subject: Re: [PATCH 2/3] KVM: Guest page hinting functionality
Date: Wed, 2 Aug 2017 16:37:57 -0400	[thread overview]
Message-ID: <5fdf803a-d28d-33dd-c4e2-88791b3f248e@redhat.com> (raw)
In-Reply-To: <1501701646.26846.57.camel@redhat.com>


[-- Attachment #1.1: Type: text/plain, Size: 1479 bytes --]



On 08/02/2017 03:20 PM, Rik van Riel wrote:
> On Wed, 2017-08-02 at 14:59 -0400, Nitesh Narayan Lal wrote:
>>>> -struct hypervisor_pages hypervisor_pagelist[MAX_FGPT_ENTRIES];
>>>> +struct hypervisor_pages hypervisor_pagelist[MAX_FGPT_ENTRIES -
>>>> 1];
>>>> +
>>>> +static void empty_hyperlist(void)
>>>> +{
>>>> +	int i = 0;
>>>> +
>>>> +	while (i < MAX_FGPT_ENTRIES - 1) {
>>>       MAX_FGPT_ENTRIES in-place of 'MAX_FGPT_ENTRIES - 1' here
>>>       and at similar other places?
>> This is because CPU local list has a total of 1000 entries
>> (MAX_FGPT_ENTRIES) where as CPU global list has 999 entries. If you
>> see
>> the arch_free_page_slowpath() and consider a situation where there
>> are
>> 1000 entries of singly allocated free pages in cpu-local list i.e.,
>> none
>> of them are re-allocated. While adding them to the cpu global list
>> when
>> cpu local list index reaches to 1000 the outer loop will terminate
>> due
>> to which cpu global list index will never reach to 1000 and
>> compress_hyperlist()/make_hypercall() will never be called.
> Can you explain why the hypervisor_pagelist
> is smaller than the cpu local list?
>
> This makes no sense to me. Why are they not
> the same size?
>
> That would certainly make the code easier to read.

I am sorry. There is no point of complicating things when it could be
done in a simpler way.
I will make the required changes in my next patch-set.

-- 
Regards
Nitesh


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

  reply	other threads:[~2017-08-02 20:38 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-01 20:48 [PATCH 0/3] [RFC] KVM: Guest page hinting Nitesh Narayan Lal
2017-08-01 20:48 ` [PATCH 1/3] KVM: Support for guest " Nitesh Narayan Lal
2017-08-02  7:12   ` kbuild test robot
2017-08-01 20:48 ` [PATCH 2/3] KVM: Guest page hinting functionality Nitesh Narayan Lal
2017-08-02  7:01   ` Pankaj Gupta
2017-08-02 18:59     ` Nitesh Narayan Lal
2017-08-02 19:20       ` Rik van Riel
2017-08-02 20:37         ` Nitesh Narayan Lal [this message]
2017-08-02 12:19   ` Pankaj Gupta
2017-08-02 15:02     ` Rik van Riel
2017-08-01 20:48 ` [PATCH 3/3] KVM: Adding tracepoints for guest page hinting Nitesh Narayan Lal
2017-08-04  5:16 ` [PATCH 0/3] [RFC] KVM: Guest " Yang Zhang
2017-08-04 11:59   ` David Hildenbrand

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=5fdf803a-d28d-33dd-c4e2-88791b3f248e@redhat.com \
    --to=nilal@redhat.com \
    --cc=david@redhat.com \
    --cc=kvm@vger.kernel.org \
    --cc=mst@redhat.com \
    --cc=pagupta@redhat.com \
    --cc=riel@redhat.com \
    --cc=wei.w.wang@intel.com \
    --cc=yang.zhang.wz@gmail.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;
as well as URLs for NNTP newsgroup(s).