Skip to content

Commit 8de2979

Browse files
committed
page_pool: halve BIAS_MAX for multiple user references of a fragment
JIRA: https://issues.redhat.com/browse/RHEL-91107 commit aaf153a Author: Liang Chen <liangchen.linux@gmail.com> Date: Fri Dec 15 11:30:09 2023 +0800 page_pool: halve BIAS_MAX for multiple user references of a fragment Up to now, we were only subtracting from the number of used page fragments to figure out when a page could be freed or recycled. A following patch introduces support for multiple users referencing the same fragment. So reduce the initial page fragments value to half to avoid overflowing. Signed-off-by: Liang Chen <liangchen.linux@gmail.com> Reviewed-by: Yunsheng Lin <linyunsheng@huawei.com> Reviewed-by: Mina Almasry <almarsymina@google.com> Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Ivan Vecera <ivecera@redhat.com>
1 parent 5b54e29 commit 8de2979

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

net/core/page_pool.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
#define DEFER_TIME (msecs_to_jiffies(1000))
2929
#define DEFER_WARN_INTERVAL (60 * HZ)
3030

31-
#define BIAS_MAX LONG_MAX
31+
#define BIAS_MAX (LONG_MAX >> 1)
3232

3333
#ifdef CONFIG_PAGE_POOL_STATS
3434
static DEFINE_PER_CPU(struct page_pool_recycle_stats, pp_system_recycle_stats);

0 commit comments

Comments
 (0)