Re: [PATCH v3 net-next 08/14] mlx4: use order-0 pages for RX
From: Alexander Duyck <hidden>
Date: 2017-02-13 23:16:37
On Mon, Feb 13, 2017 at 1:09 PM, Eric Dumazet [off-list ref] wrote:
On Mon, Feb 13, 2017 at 12:51 PM, Alexander Duyck [off-list ref] wrote:quoted
On Mon, Feb 13, 2017 at 11:58 AM, Eric Dumazet [off-list ref] wrote:quoted
quoted
+ PAGE_SIZE, priv->dma_dir); page = page_alloc->page; /* Revert changes done by mlx4_alloc_pages */ - page_ref_sub(page, page_alloc->page_size / + page_ref_sub(page, PAGE_SIZE / priv->frag_info[i].frag_stride - 1); put_page(page); page_alloc->page = NULL;You can probably simplify this by using __page_frag_cache_drain since that way you can just doe the sub and test for the whole set instead of doing N - 1 and 1.Well, we remove this anyway in following patch ;)
Any plans to add the bulk page count updates back at some point? I
just got around to adding it for igb in commit bd4171a5d4c2 ("igb:
update code to better handle incrementing page count"). I should have
patches for ixgbe, i40e, and i40evf here pretty soon. That was one of
the reasons why I implemented __page_frag_cache_drain in the first
place. As I'm sure Jesper will probably point out the atomic op for
get_page/page_ref_inc can be pretty expensive if I recall correctly.
- Alex