Message ID | 20231124073439.52626-3-liangchen.linux@gmail.com (mailing list archive) |
---|---|
State | Superseded |
Delegated to: | Netdev Maintainers |
Headers | show |
Series | skbuff: Optimize SKB coalescing for page pool | expand |
On 2023/11/24 15:34, Liang Chen wrote: The title seems a little hard for me to understand, but the description below does seem clear to me, so LGTM. Reviewed-by: Yunsheng Lin <linyunsheng@huawei.com> > Referring to patch [1], in order to support multiple users referencing the > same fragment and prevent overflow from pp_ref_count growing, the initial > value of pp_ref_count is halved, leaving room for pp_ref_count to increment > before the page is drained.
On Sat, Nov 25, 2023 at 8:01 PM Yunsheng Lin <linyunsheng@huawei.com> wrote: > > On 2023/11/24 15:34, Liang Chen wrote: > > The title seems a little hard for me to understand, but the description > below does seem clear to me, so LGTM. > > Reviewed-by: Yunsheng Lin <linyunsheng@huawei.com> > Thanks! I will change the title to "halve BIAS_MAX for multiple user references of a fragment" > > Referring to patch [1], in order to support multiple users referencing the > > same fragment and prevent overflow from pp_ref_count growing, the initial > > value of pp_ref_count is halved, leaving room for pp_ref_count to increment > > before the page is drained.
diff --git a/net/core/page_pool.c b/net/core/page_pool.c index 0c6c2b11aabe..24b83dfe6968 100644 --- a/net/core/page_pool.c +++ b/net/core/page_pool.c @@ -26,7 +26,7 @@ #define DEFER_TIME (msecs_to_jiffies(1000)) #define DEFER_WARN_INTERVAL (60 * HZ) -#define BIAS_MAX LONG_MAX +#define BIAS_MAX (LONG_MAX >> 1) #ifdef CONFIG_PAGE_POOL_STATS /* alloc_stat_inc is intended to be used in softirq context */
Referring to patch [1], in order to support multiple users referencing the same fragment and prevent overflow from pp_ref_count growing, the initial value of pp_ref_count is halved, leaving room for pp_ref_count to increment before the page is drained. [1] https://lore.kernel.org/all/20211009093724.10539-3-linyunsheng@huawei.com/ Signed-off-by: Liang Chen <liangchen.linux@gmail.com> --- net/core/page_pool.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)