[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <f2d00eca-e40b-c0e9-5aae-a9a8105169b1@intel.com>
Date: Mon, 5 Nov 2018 08:37:57 -0800
From: Dave Hansen <dave.hansen@...el.com>
To: Aaron Lu <aaron.lu@...el.com>, linux-mm@...ck.org,
linux-kernel@...r.kernel.org, netdev@...r.kernel.org
Cc: Andrew Morton <akpm@...ux-foundation.org>,
Paweł Staszewski <pstaszewski@...are.pl>,
Jesper Dangaard Brouer <brouer@...hat.com>,
Eric Dumazet <eric.dumazet@...il.com>,
Tariq Toukan <tariqt@...lanox.com>,
Ilias Apalodimas <ilias.apalodimas@...aro.org>,
Yoel Caspersen <yoel@...knet.dk>,
Mel Gorman <mgorman@...hsingularity.net>,
Saeed Mahameed <saeedm@...lanox.com>,
Michal Hocko <mhocko@...e.com>,
Vlastimil Babka <vbabka@...e.cz>,
Dave Hansen <dave.hansen@...ux.intel.com>
Subject: Re: [PATCH 1/2] mm/page_alloc: free order-0 pages through PCP in
page_frag_free()
On 11/5/18 12:58 AM, Aaron Lu wrote:
> - if (unlikely(put_page_testzero(page)))
> - __free_pages_ok(page, compound_order(page));
> + if (unlikely(put_page_testzero(page))) {
> + unsigned int order = compound_order(page);
> +
> + if (order == 0)
> + free_unref_page(page);
> + else
> + __free_pages_ok(page, order);
> + }
> }
This little hunk seems repeated in __free_pages() and
__page_frag_cache_drain(). Do we need a common helper?
Powered by blists - more mailing lists