2021-01-31 14:12:19

by Matthew Wilcox

[permalink] [raw]
Subject: Re: [PATCH v3 net-next 5/5] net: page_pool: simplify page recycling condition tests

On Sun, Jan 31, 2021 at 12:12:11PM +0000, Alexander Lobakin wrote:
> pool_page_reusable() is a leftover from pre-NUMA-aware times. For now,
> this function is just a redundant wrapper over page_is_pfmemalloc(),
> so inline it into its sole call site.

Why doesn't this want to use {dev_}page_is_reusable()?


2021-01-31 14:14:02

by Alexander Lobakin

[permalink] [raw]
Subject: Re: [PATCH v3 net-next 5/5] net: page_pool: simplify page recycling condition tests

From: Matthew Wilcox <[email protected]>
Date: Sun, 31 Jan 2021 12:23:48 +0000

> On Sun, Jan 31, 2021 at 12:12:11PM +0000, Alexander Lobakin wrote:
> > pool_page_reusable() is a leftover from pre-NUMA-aware times. For now,
> > this function is just a redundant wrapper over page_is_pfmemalloc(),
> > so inline it into its sole call site.
>
> Why doesn't this want to use {dev_}page_is_reusable()?

Page Pool handles NUMA on its own. Replacing plain page_is_pfmemalloc()
with dev_page_is_reusable() will only add a completely redundant and
always-false check on the fastpath.

Al