]> git.baikalelectronics.ru Git - kernel.git/commit
page_pool: Add API to update numa node
authorSaeed Mahameed <saeedm@mellanox.com>
Wed, 20 Nov 2019 00:15:17 +0000 (00:15 +0000)
committerDavid S. Miller <davem@davemloft.net>
Wed, 20 Nov 2019 19:47:36 +0000 (11:47 -0800)
commitf79d8a448d4253c92bffad7e7c2734751f389aad
tree54213e3deff21544f3a1114cb79becf1c071516e
parentb5ac16885015fa46f3cbbbac4fbfadf9064dddef
page_pool: Add API to update numa node

Add page_pool_update_nid() to be called by page pool consumers when they
detect numa node changes.

It will update the page pool nid value to start allocating from the new
effective numa node.

This is to mitigate page pool allocating pages from a wrong numa node,
where the pool was originally allocated, and holding on to pages that
belong to a different numa node, which causes performance degradation.

For pages that are already being consumed and could be returned to the
pool by the consumer, in next patch we will add a check per page to avoid
recycling them back to the pool and return them to the page allocator.

Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
Acked-by: Jonathan Lemon <jonathan.lemon@gmail.com>
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Acked-by: Jesper Dangaard Brouer <brouer@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/net/page_pool.h
include/trace/events/page_pool.h
net/core/page_pool.c