linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Gavin Shan <gshan@redhat.com>
To: Matthew Wilcox <willy@infradead.org>
Cc: Vincent Donnefort <vdonnefort@google.com>,
	maz@kernel.org, oliver.upton@linux.dev, kvmarm@lists.linux.dev,
	linux-arm-kernel@lists.infradead.org, kernel-team@android.com,
	will@kernel.org
Subject: Re: [PATCH v2 2/2] KVM: arm64: Use folio for THP adjustment
Date: Sat, 30 Sep 2023 09:52:21 +1000	[thread overview]
Message-ID: <cb1dad7f-9756-f2f3-8708-7d1c57c7c1b0@redhat.com> (raw)
In-Reply-To: <ZRbMF1Ik+GOuTk7s@casper.infradead.org>

Hi Matthew,

On 9/29/23 23:07, Matthew Wilcox wrote:
> On Fri, Sep 29, 2023 at 05:24:00PM +1000, Gavin Shan wrote:
>>> +		size_t sz = folio_size(pfn_folio(pfn));
>>
>> Is it possible that a tail page is returned from __gfn_to_pfn_memslot()? folio_size()
>> doesn't work for a tail page because order 0 is returned for tail pages. It seems it's
> 
> pfn_folio() can't return a tail page.  That's the point of folios; they
> aren't tail pages.  They're either a head page or an order-0 page.
> 

Indeed, page_folio() already returned the head page properly.
Thanks a lot for your confirm.

Thanks,
Gavin


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  reply	other threads:[~2023-09-29 23:53 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-28 17:32 [PATCH v2 0/2] KVM: arm64: Use folio for THP support Vincent Donnefort
2023-09-28 17:32 ` [PATCH v2 1/2] KVM: arm64: Do not transfer page refcount for THP adjustment Vincent Donnefort
2023-09-29  6:59   ` Gavin Shan
2023-09-29 12:47     ` Vincent Donnefort
2023-09-28 17:32 ` [PATCH v2 2/2] KVM: arm64: Use folio " Vincent Donnefort
2023-09-29  7:24   ` Gavin Shan
2023-09-29 13:07     ` Matthew Wilcox
2023-09-29 23:52       ` Gavin Shan [this message]
2023-09-29 23:53   ` Gavin Shan
2023-10-28  9:17   ` Ryan Roberts
2023-10-30 10:40     ` Marc Zyngier
2023-10-30 10:57       ` Ryan Roberts
2023-10-30 10:47     ` Vincent Donnefort
2023-10-30 11:01       ` Ryan Roberts
2023-09-29  9:12 ` [PATCH v2 0/2] KVM: arm64: Use folio for THP support Marc Zyngier
2023-09-30 17:57 ` Oliver Upton
2023-10-30 20:16   ` Oliver Upton

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=cb1dad7f-9756-f2f3-8708-7d1c57c7c1b0@redhat.com \
    --to=gshan@redhat.com \
    --cc=kernel-team@android.com \
    --cc=kvmarm@lists.linux.dev \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=maz@kernel.org \
    --cc=oliver.upton@linux.dev \
    --cc=vdonnefort@google.com \
    --cc=will@kernel.org \
    --cc=willy@infradead.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 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).