From: Andrew Morton <akpm@linux-foundation.org>
To: Aaron Lu <aaron.lu@intel.com>
Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org,
netdev@vger.kernel.org,
"Paweł Staszewski" <pstaszewski@itcare.pl>,
"Jesper Dangaard Brouer" <brouer@redhat.com>,
"Eric Dumazet" <eric.dumazet@gmail.com>,
"Tariq Toukan" <tariqt@mellanox.com>,
"Ilias Apalodimas" <ilias.apalodimas@linaro.org>,
"Yoel Caspersen" <yoel@kviknet.dk>,
"Mel Gorman" <mgorman@techsingularity.net>,
"Saeed Mahameed" <saeedm@mellanox.com>,
"Michal Hocko" <mhocko@suse.com>,
"Vlastimil Babka" <vbabka@suse.cz>,
"Dave Hansen" <dave.hansen@linux.intel.com>,
"Alexander Duyck" <alexander.h.duyck@linux.intel.com>,
"Ian Kumlien" <ian.kumlien@gmail.com>
Subject: Re: [PATCH v2 RESEND update 1/2] mm/page_alloc: free order-0 pages through PCP in page_frag_free()
Date: Wed, 21 Nov 2018 19:15:11 -0800 [thread overview]
Message-ID: <20181121191511.658e0d41504e146edd88af53@linux-foundation.org> (raw)
In-Reply-To: <20181120014544.GB10657@intel.com>
On Tue, 20 Nov 2018 09:45:44 +0800 Aaron Lu <aaron.lu@intel.com> wrote:
> page_frag_free() calls __free_pages_ok() to free the page back to
> Buddy. This is OK for high order page, but for order-0 pages, it
> misses the optimization opportunity of using Per-Cpu-Pages and can
> cause zone lock contention when called frequently.
>
Looks nice to me. Let's tell our readers why we're doing this.
--- a/mm/page_alloc.c~mm-page_alloc-free-order-0-pages-through-pcp-in-page_frag_free-fix
+++ a/mm/page_alloc.c
@@ -4684,7 +4684,7 @@ void page_frag_free(void *addr)
if (unlikely(put_page_testzero(page))) {
unsigned int order = compound_order(page);
- if (order == 0)
+ if (order == 0) /* Via pcp? */
free_unref_page(page);
else
__free_pages_ok(page, order);
_
next prev parent reply other threads:[~2018-11-22 3:15 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-11-19 13:48 [PATCH RESEND 0/2] free order-0 pages through PCP in page_frag_free() and cleanup Aaron Lu
2018-11-19 13:48 ` [PATCH v2 RESEND 1/2] mm/page_alloc: free order-0 pages through PCP in page_frag_free() Aaron Lu
2018-11-19 15:00 ` Tariq Toukan
2018-11-20 1:43 ` Aaron Lu
2018-11-20 1:45 ` [PATCH v2 RESEND update " Aaron Lu
2018-11-20 9:42 ` Pankaj Gupta
2018-11-22 3:15 ` Andrew Morton [this message]
2018-11-19 13:48 ` [PATCH v3 RESEND 2/2] mm/page_alloc: use a single function to free page Aaron Lu
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=20181121191511.658e0d41504e146edd88af53@linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=aaron.lu@intel.com \
--cc=alexander.h.duyck@linux.intel.com \
--cc=brouer@redhat.com \
--cc=dave.hansen@linux.intel.com \
--cc=eric.dumazet@gmail.com \
--cc=ian.kumlien@gmail.com \
--cc=ilias.apalodimas@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mgorman@techsingularity.net \
--cc=mhocko@suse.com \
--cc=netdev@vger.kernel.org \
--cc=pstaszewski@itcare.pl \
--cc=saeedm@mellanox.com \
--cc=tariqt@mellanox.com \
--cc=vbabka@suse.cz \
--cc=yoel@kviknet.dk \
/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).