linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Qu Wenruo <wqu@suse.com>
To: Christoph Hellwig <hch@infradead.org>,
	Qu Wenruo <quwenruo.btrfs@gmx.com>
Cc: linux-btrfs@vger.kernel.org
Subject: Re: [PATCH] btrfs: add a debug accounting for eb pages contiguousness
Date: Mon, 10 Jul 2023 13:52:23 +0800	[thread overview]
Message-ID: <49fa58bb-79bc-ce01-bab3-32ba4d97b8c7@suse.com> (raw)
In-Reply-To: <ZKuXGdWdMlgrmgE4@infradead.org>



On 2023/7/10 13:28, Christoph Hellwig wrote:
> On Sun, Jul 09, 2023 at 12:44:33PM +0800, Qu Wenruo wrote:
>> Unfortunately __filemap_get_folio() is still only creating folios using
>> order 0, under the no_page tag:
>>
>> 	folio = filemap_alloc_folio(gfp, 0);
>>
>> So in that case, it's really no difference than find_or_create_page()
>> for new pages/folios.
> 
> You're right, willys patches to pass the order haven't actually
> made it to mainline yet, and I assumed they did.  So you'll have
> to wait another merge window.

I'm considering another solution like this:

	folio = filemap_alloc_folio();
	do_something_with_folio();
	ret = filemap_add_folio();

Which is not that complex and pretty much used everywhere in mm code.

Although I still need the old per-page allocation as a fallback, which 
may make it more complex than expected.

Thanks,
Qu

      reply	other threads:[~2023-07-10  5:52 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-07  8:40 [PATCH] btrfs: add a debug accounting for eb pages contiguousness Qu Wenruo
2023-07-07 11:39 ` Christoph Hellwig
2023-07-07 11:45   ` Qu Wenruo
2023-07-07 11:51     ` Christoph Hellwig
2023-07-09  4:44       ` Qu Wenruo
2023-07-10  5:28         ` Christoph Hellwig
2023-07-10  5:52           ` Qu Wenruo [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=49fa58bb-79bc-ce01-bab3-32ba4d97b8c7@suse.com \
    --to=wqu@suse.com \
    --cc=hch@infradead.org \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=quwenruo.btrfs@gmx.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;
as well as URLs for NNTP newsgroup(s).