From: Mel Gorman <mgorman@techsingularity.net>
To: "Matthew Wilcox (Oracle)" <willy@infradead.org>
Cc: Andrew Morton <akpm@linux-foundation.org>,
linux-mm@kvack.org, linux-kernel@vger.kernel.org
Subject: Re: [RFC] mm: Optimise put_pages_list()
Date: Mon, 4 Oct 2021 10:10:37 +0100 [thread overview]
Message-ID: <20211004091037.GM3959@techsingularity.net> (raw)
In-Reply-To: <20210930163258.3114404-1-willy@infradead.org>
On Thu, Sep 30, 2021 at 05:32:58PM +0100, Matthew Wilcox (Oracle) wrote:
> Instead of calling put_page() one page at a time, pop pages off
> the list if there are other refcounts and pass the remainder
> to free_unref_page_list(). This should be a speed improvement,
> but I have no measurements to support that. It's also not very
> widely used today, so I can't say I've really tested it. I'm only
> bothering with this patch because I'd like the IOMMU code to use it
> https://lore.kernel.org/lkml/20210930162043.3111119-1-willy@infradead.org/
>
> Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
I see your motivation but you need to check that all users of
put_pages_list (current and future) handle destroy_compound_page properly
or handle it within put_pages_list. For example, the release_pages()
user of free_unref_page_list calls __put_compound_page directly before
freeing. put_pages_list as it stands will call dstroy_compound_page but
free_unref_page_list does not destroy compound pages in free_pages_prepare
--
Mel Gorman
SUSE Labs
next prev parent reply other threads:[~2021-10-04 9:10 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-09-30 16:32 Matthew Wilcox (Oracle)
2021-10-04 9:10 ` Mel Gorman [this message]
2021-10-04 12:49 ` Matthew Wilcox
2021-10-04 14:29 ` Mel Gorman
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=20211004091037.GM3959@techsingularity.net \
--to=mgorman@techsingularity.net \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.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