From: Matthew Wilcox <willy@infradead.org>
To: Jianfeng Wang <jianfeng.w.wang@oracle.com>
Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org,
akpm@linux-foundation.org, sidhartha.kumar@oracle.com
Subject: Re: [PATCH] mm/cma: convert cma_alloc() to return folio
Date: Tue, 27 Feb 2024 20:51:12 +0000 [thread overview]
Message-ID: <Zd5LQHoSAqC9HFv8@casper.infradead.org> (raw)
In-Reply-To: <cf6c758a-42a9-4d4c-a1f7-71f4fc09e8a0@oracle.com>
On Tue, Feb 27, 2024 at 11:26:02AM -0800, Jianfeng Wang wrote:
>
>
> On 2/27/24 11:00 AM, Matthew Wilcox wrote:
> > On Tue, Feb 27, 2024 at 10:13:38AM -0800, Jianfeng Wang wrote:
> >> Change cma_alloc() to return struct folio. This further increases the
> >> usage of folios in mm/hugetlb.
> >
> > I love the idea, but I don't think this works. The memory returned
> > from cma_alloc() isn't set up to be a folio, is it? That is, it
> > doesn't have compound_head initialised so that page_folio() on
> > consecutive pages will return the same pointer.
>
> Thanks for review.
> cma_alloc() returns an array of order-0 pages. So, this commit makes
> cma_alloc() return an array of folios (each an order-0 page) rather
> than a compound page. Functions that use cma_alloc() do not expect
> a compound page as well.
No, this is not the way.
prev parent reply other threads:[~2024-02-27 20:51 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-27 18:13 Jianfeng Wang
2024-02-27 19:00 ` Matthew Wilcox
2024-02-27 19:26 ` Jianfeng Wang
2024-02-27 20:51 ` Matthew Wilcox [this message]
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=Zd5LQHoSAqC9HFv8@casper.infradead.org \
--to=willy@infradead.org \
--cc=akpm@linux-foundation.org \
--cc=jianfeng.w.wang@oracle.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=sidhartha.kumar@oracle.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