mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jianfeng Wang <jianfeng.w.wang@oracle.com>
To: Matthew Wilcox <willy@infradead.org>
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 11:26:02 -0800	[thread overview]
Message-ID: <cf6c758a-42a9-4d4c-a1f7-71f4fc09e8a0@oracle.com> (raw)
In-Reply-To: <Zd4xR9sojA-4Mdwm@casper.infradead.org>



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.

> Or have I misunderstood?

  reply	other threads:[~2024-02-27 19:26 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 [this message]
2024-02-27 20:51     ` Matthew Wilcox

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=cf6c758a-42a9-4d4c-a1f7-71f4fc09e8a0@oracle.com \
    --to=jianfeng.w.wang@oracle.com \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=sidhartha.kumar@oracle.com \
    --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

all inboxes | Powered by JetHome®