All of lore.kernel.org
 help / color / mirror / Atom feed
From: Suzuki K Poulose <Suzuki.Poulose@arm.com>
To: Christoffer Dall <cdall@linaro.org>
Cc: linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org, christoffer.dall@linaro.org,
	marc.zyngier@arm.com, kvmarm@lists.cs.columbia.edu,
	kvm@vger.kernel.org
Subject: Re: [PATCH] kvm: arm/arm64: Rework gpa callback handlers
Date: Mon, 27 Mar 2017 16:18:14 +0100	[thread overview]
Message-ID: <d4f1c780-a8ee-fd87-304e-92f67049f92f@arm.com> (raw)
In-Reply-To: <20170324180002.GJ25903@cbox>

On 24/03/17 18:00, Christoffer Dall wrote:
> On Mon, Mar 20, 2017 at 06:26:42PM +0000, Suzuki K Poulose wrote:
>> In order to perform an operation on a gpa range, the hyp iterates
>
> the hyp ?

To be precise "the host" ?

>
>> over each page in a user memory slot for the given range. This is
>> inefficient while dealing with a big range (e.g, a VMA), especially
>> while unmaping a range. At present, with stage2 unmap on a range with
>> a hugepage backed region, we clear the PMD when we unmap the first
>> page in the loop. The remaining iterations simply traverse the page table
>> down to the PMD level only to see that nothing is in there.
>>
>> This patch reworks the code to invoke the callback handlers on the
>> biggest range possible within the memory slot to avoid reduce the
>> number of iterations.
>
> avoid reduce?
>
> did you mean "to reduce the number of times the handler is called" ?

Yep, thanks for spotting.

>
>>
>> Cc: Marc Zyngier <marc.zyngier@arm.com>
>> Cc: Christoffer Dall <christoffer.dall@linaro.org>
>> Signed-off-by: Suzuki K Poulose <suzuki.poulose@arm.com>
>> ---
>>  arch/arm/kvm/mmu.c | 31 +++++++++++++------------------
>>  1 file changed, 13 insertions(+), 18 deletions(-)
>>
>> diff --git a/arch/arm/kvm/mmu.c b/arch/arm/kvm/mmu.c
>> index 37e67f5..8357fed 100644
>> --- a/arch/arm/kvm/mmu.c
>> +++ b/arch/arm/kvm/mmu.c
...

>>
>
> Otherwise looks good:
>
> I can fix up the commit message when applying this.
>
> Reviewed-by: Christoffer Dall <cdall@linaro.org>

Thanks

Suzuki

WARNING: multiple messages have this Message-ID (diff)
From: Suzuki K Poulose <Suzuki.Poulose@arm.com>
To: Christoffer Dall <cdall@linaro.org>
Cc: kvm@vger.kernel.org, marc.zyngier@arm.com,
	linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	kvmarm@lists.cs.columbia.edu
Subject: Re: [PATCH] kvm: arm/arm64: Rework gpa callback handlers
Date: Mon, 27 Mar 2017 16:18:14 +0100	[thread overview]
Message-ID: <d4f1c780-a8ee-fd87-304e-92f67049f92f@arm.com> (raw)
In-Reply-To: <20170324180002.GJ25903@cbox>

On 24/03/17 18:00, Christoffer Dall wrote:
> On Mon, Mar 20, 2017 at 06:26:42PM +0000, Suzuki K Poulose wrote:
>> In order to perform an operation on a gpa range, the hyp iterates
>
> the hyp ?

To be precise "the host" ?

>
>> over each page in a user memory slot for the given range. This is
>> inefficient while dealing with a big range (e.g, a VMA), especially
>> while unmaping a range. At present, with stage2 unmap on a range with
>> a hugepage backed region, we clear the PMD when we unmap the first
>> page in the loop. The remaining iterations simply traverse the page table
>> down to the PMD level only to see that nothing is in there.
>>
>> This patch reworks the code to invoke the callback handlers on the
>> biggest range possible within the memory slot to avoid reduce the
>> number of iterations.
>
> avoid reduce?
>
> did you mean "to reduce the number of times the handler is called" ?

Yep, thanks for spotting.

>
>>
>> Cc: Marc Zyngier <marc.zyngier@arm.com>
>> Cc: Christoffer Dall <christoffer.dall@linaro.org>
>> Signed-off-by: Suzuki K Poulose <suzuki.poulose@arm.com>
>> ---
>>  arch/arm/kvm/mmu.c | 31 +++++++++++++------------------
>>  1 file changed, 13 insertions(+), 18 deletions(-)
>>
>> diff --git a/arch/arm/kvm/mmu.c b/arch/arm/kvm/mmu.c
>> index 37e67f5..8357fed 100644
>> --- a/arch/arm/kvm/mmu.c
>> +++ b/arch/arm/kvm/mmu.c
...

>>
>
> Otherwise looks good:
>
> I can fix up the commit message when applying this.
>
> Reviewed-by: Christoffer Dall <cdall@linaro.org>

Thanks

Suzuki

WARNING: multiple messages have this Message-ID (diff)
From: Suzuki.Poulose@arm.com (Suzuki K Poulose)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] kvm: arm/arm64: Rework gpa callback handlers
Date: Mon, 27 Mar 2017 16:18:14 +0100	[thread overview]
Message-ID: <d4f1c780-a8ee-fd87-304e-92f67049f92f@arm.com> (raw)
In-Reply-To: <20170324180002.GJ25903@cbox>

On 24/03/17 18:00, Christoffer Dall wrote:
> On Mon, Mar 20, 2017 at 06:26:42PM +0000, Suzuki K Poulose wrote:
>> In order to perform an operation on a gpa range, the hyp iterates
>
> the hyp ?

To be precise "the host" ?

>
>> over each page in a user memory slot for the given range. This is
>> inefficient while dealing with a big range (e.g, a VMA), especially
>> while unmaping a range. At present, with stage2 unmap on a range with
>> a hugepage backed region, we clear the PMD when we unmap the first
>> page in the loop. The remaining iterations simply traverse the page table
>> down to the PMD level only to see that nothing is in there.
>>
>> This patch reworks the code to invoke the callback handlers on the
>> biggest range possible within the memory slot to avoid reduce the
>> number of iterations.
>
> avoid reduce?
>
> did you mean "to reduce the number of times the handler is called" ?

Yep, thanks for spotting.

>
>>
>> Cc: Marc Zyngier <marc.zyngier@arm.com>
>> Cc: Christoffer Dall <christoffer.dall@linaro.org>
>> Signed-off-by: Suzuki K Poulose <suzuki.poulose@arm.com>
>> ---
>>  arch/arm/kvm/mmu.c | 31 +++++++++++++------------------
>>  1 file changed, 13 insertions(+), 18 deletions(-)
>>
>> diff --git a/arch/arm/kvm/mmu.c b/arch/arm/kvm/mmu.c
>> index 37e67f5..8357fed 100644
>> --- a/arch/arm/kvm/mmu.c
>> +++ b/arch/arm/kvm/mmu.c
...

>>
>
> Otherwise looks good:
>
> I can fix up the commit message when applying this.
>
> Reviewed-by: Christoffer Dall <cdall@linaro.org>

Thanks

Suzuki

  reply	other threads:[~2017-03-27 15:18 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-20 18:26 [PATCH] kvm: arm/arm64: Rework gpa callback handlers Suzuki K Poulose
2017-03-20 18:26 ` Suzuki K Poulose
2017-03-20 18:26 ` Suzuki K Poulose
2017-03-24 18:00 ` Christoffer Dall
2017-03-24 18:00   ` Christoffer Dall
2017-03-24 18:00   ` Christoffer Dall
2017-03-27 15:18   ` Suzuki K Poulose [this message]
2017-03-27 15:18     ` Suzuki K Poulose
2017-03-27 15:18     ` Suzuki K Poulose

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=d4f1c780-a8ee-fd87-304e-92f67049f92f@arm.com \
    --to=suzuki.poulose@arm.com \
    --cc=cdall@linaro.org \
    --cc=christoffer.dall@linaro.org \
    --cc=kvm@vger.kernel.org \
    --cc=kvmarm@lists.cs.columbia.edu \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=marc.zyngier@arm.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 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.