All of lore.kernel.org
 help / color / mirror / Atom feed
From: Marc Zyngier <maz@kernel.org>
To: Gavin Shan <gshan@redhat.com>
Cc: kernel-team@android.com, Will Deacon <will@kernel.org>,
	kvmarm@lists.cs.columbia.edu
Subject: Re: [PATCH] KVM: arm64: Allocate stage-2 pgd pages with GFP_KERNEL_ACCOUNT
Date: Tue, 27 Oct 2020 09:27:05 +0000	[thread overview]
Message-ID: <bb240736aae6315df28c90463e1c8801@kernel.org> (raw)
In-Reply-To: <962c401d-4376-7ecf-1a8b-b6ad91ecfe68@redhat.com>

On 2020-10-26 23:41, Gavin Shan wrote:
> Hi Will,
> 
> On 10/27/20 1:44 AM, Will Deacon wrote:
>> For consistency with the rest of the stage-2 page-table page 
>> allocations
>> (performing using a kvm_mmu_memory_cache), ensure that __GFP_ACCOUNT 
>> is
>> included in the GFP flags for the PGD pages.
>> 
>> Cc: Marc Zyngier <maz@kernel.org>
>> Cc: Quentin Perret <qperret@google.com>
>> Signed-off-by: Will Deacon <will@kernel.org>
>> ---
>>   arch/arm64/kvm/hyp/pgtable.c | 2 +-
>>   1 file changed, 1 insertion(+), 1 deletion(-)
>> 
> 
> The patch itself looks good to me:
> 
> Reviewed-by: Gavin Shan <gshan@redhat.com>
> 
> Another question is why the page-table pages for hyp mode aren't
> allocated with __GFP_ACCOUNT in kvm_pgtable_hyp_init and 
> hyp_map_walker()?

Why user task would you account the hypervisor mappings to? The page 
tables
used for HYP code and data are definitely not attributable to any task.

The kvm and kvm_vcpu mappings *could* be attributed to a user task, but
the page tables are likely shared with other tasks. So who gets the 
blame?

         M.
-- 
Jazz is not dead. It just smells funny...
_______________________________________________
kvmarm mailing list
kvmarm@lists.cs.columbia.edu
https://lists.cs.columbia.edu/mailman/listinfo/kvmarm

  reply	other threads:[~2020-10-27  9:27 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-26 14:44 [PATCH] KVM: arm64: Allocate stage-2 pgd pages with GFP_KERNEL_ACCOUNT Will Deacon
2020-10-26 23:41 ` Gavin Shan
2020-10-27  9:27   ` Marc Zyngier [this message]
2020-10-28  5:56     ` Gavin Shan
2020-10-28  8:56       ` Marc Zyngier
2020-10-27  9:27   ` Will Deacon
2020-10-28  5:52     ` Gavin Shan
2020-10-29 21:09 ` Marc Zyngier
2020-10-29 21:09   ` Marc Zyngier

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=bb240736aae6315df28c90463e1c8801@kernel.org \
    --to=maz@kernel.org \
    --cc=gshan@redhat.com \
    --cc=kernel-team@android.com \
    --cc=kvmarm@lists.cs.columbia.edu \
    --cc=will@kernel.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.