* [PATCH net-next] gve: change to use page_pool_put_full_page when recycling pages
@ 2024-10-23 22:11 Praveen Kaligineedi
2024-10-24 2:36 ` Yunsheng Lin
2024-10-31 1:10 ` patchwork-bot+netdevbpf
0 siblings, 2 replies; 6+ messages in thread
From: Praveen Kaligineedi @ 2024-10-23 22:11 UTC (permalink / raw)
To: netdev
Cc: davem, edumazet, kuba, pabeni, andrew+netdev, willemb, jeroendb,
shailend, hramamurthy, ziweixiao, linyunsheng, jacob.e.keller,
Praveen Kaligineedi
From: Harshitha Ramamurthy <hramamurthy@google.com>
The driver currently uses page_pool_put_page() to recycle
page pool pages. Since gve uses split pages, if the fragment
being recycled is not the last fragment in the page, there
is no dma sync operation. When the last fragment is recycled,
dma sync is performed by page pool infra according to the
value passed as dma_sync_size which right now is set to the
size of fragment.
But the correct thing to do is to dma sync the entire page when
the last fragment is recycled. Hence change to using
page_pool_put_full_page().
Link: https://lore.kernel.org/netdev/89d7ce83-cc1d-4791-87b5-6f7af29a031d@huawei.com/
Suggested-by: Yunsheng Lin <linyunsheng@huawei.com>
Reviewed-by: Praveen Kaligineedi <pkaligineedi@google.com>
Reviewed-by: Willem de Bruijn <willemb@google.com>
Signed-off-by: Harshitha Ramamurthy <hramamurthy@google.com>
---
drivers/net/ethernet/google/gve/gve_buffer_mgmt_dqo.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/net/ethernet/google/gve/gve_buffer_mgmt_dqo.c b/drivers/net/ethernet/google/gve/gve_buffer_mgmt_dqo.c
index 05bf1f80a79c..403f0f335ba6 100644
--- a/drivers/net/ethernet/google/gve/gve_buffer_mgmt_dqo.c
+++ b/drivers/net/ethernet/google/gve/gve_buffer_mgmt_dqo.c
@@ -210,8 +210,7 @@ void gve_free_to_page_pool(struct gve_rx_ring *rx,
if (!page)
return;
- page_pool_put_page(page->pp, page, buf_state->page_info.buf_size,
- allow_direct);
+ page_pool_put_full_page(page->pp, page, allow_direct);
buf_state->page_info.page = NULL;
}
--
2.47.0.105.g07ac214952-goog
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH net-next] gve: change to use page_pool_put_full_page when recycling pages
2024-10-23 22:11 [PATCH net-next] gve: change to use page_pool_put_full_page when recycling pages Praveen Kaligineedi
@ 2024-10-24 2:36 ` Yunsheng Lin
2024-10-24 15:45 ` Simon Horman
2024-10-31 1:10 ` patchwork-bot+netdevbpf
1 sibling, 1 reply; 6+ messages in thread
From: Yunsheng Lin @ 2024-10-24 2:36 UTC (permalink / raw)
To: Praveen Kaligineedi, netdev
Cc: davem, edumazet, kuba, pabeni, andrew+netdev, willemb, jeroendb,
shailend, hramamurthy, ziweixiao, jacob.e.keller
On 2024/10/24 6:11, Praveen Kaligineedi wrote:
> From: Harshitha Ramamurthy <hramamurthy@google.com>
>
> The driver currently uses page_pool_put_page() to recycle
> page pool pages. Since gve uses split pages, if the fragment
> being recycled is not the last fragment in the page, there
> is no dma sync operation. When the last fragment is recycled,
> dma sync is performed by page pool infra according to the
> value passed as dma_sync_size which right now is set to the
> size of fragment.
>
> But the correct thing to do is to dma sync the entire page when
> the last fragment is recycled. Hence change to using
> page_pool_put_full_page().
I am not sure if Fixes tag is needed if the blamed commit is only
in the net-next tree. Otherwise, LGTM.
Reviewed-by: Yunsheng Lin <linyunsheng@huawei.com>
>
> Link: https://lore.kernel.org/netdev/89d7ce83-cc1d-4791-87b5-6f7af29a031d@huawei.com/
>
> Suggested-by: Yunsheng Lin <linyunsheng@huawei.com>
> Reviewed-by: Praveen Kaligineedi <pkaligineedi@google.com>
> Reviewed-by: Willem de Bruijn <willemb@google.com>
> Signed-off-by: Harshitha Ramamurthy <hramamurthy@google.com>
> ---
> drivers/net/ethernet/google/gve/gve_buffer_mgmt_dqo.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/drivers/net/ethernet/google/gve/gve_buffer_mgmt_dqo.c b/drivers/net/ethernet/google/gve/gve_buffer_mgmt_dqo.c
> index 05bf1f80a79c..403f0f335ba6 100644
> --- a/drivers/net/ethernet/google/gve/gve_buffer_mgmt_dqo.c
> +++ b/drivers/net/ethernet/google/gve/gve_buffer_mgmt_dqo.c
> @@ -210,8 +210,7 @@ void gve_free_to_page_pool(struct gve_rx_ring *rx,
> if (!page)
> return;
>
> - page_pool_put_page(page->pp, page, buf_state->page_info.buf_size,
> - allow_direct);
> + page_pool_put_full_page(page->pp, page, allow_direct);
> buf_state->page_info.page = NULL;
> }
>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH net-next] gve: change to use page_pool_put_full_page when recycling pages
2024-10-24 2:36 ` Yunsheng Lin
@ 2024-10-24 15:45 ` Simon Horman
2024-10-24 17:58 ` Harshitha Ramamurthy
0 siblings, 1 reply; 6+ messages in thread
From: Simon Horman @ 2024-10-24 15:45 UTC (permalink / raw)
To: Yunsheng Lin
Cc: Praveen Kaligineedi, netdev, davem, edumazet, kuba, pabeni,
andrew+netdev, willemb, jeroendb, shailend, hramamurthy,
ziweixiao, jacob.e.keller
On Thu, Oct 24, 2024 at 10:36:02AM +0800, Yunsheng Lin wrote:
> On 2024/10/24 6:11, Praveen Kaligineedi wrote:
> > From: Harshitha Ramamurthy <hramamurthy@google.com>
> >
> > The driver currently uses page_pool_put_page() to recycle
> > page pool pages. Since gve uses split pages, if the fragment
> > being recycled is not the last fragment in the page, there
> > is no dma sync operation. When the last fragment is recycled,
> > dma sync is performed by page pool infra according to the
> > value passed as dma_sync_size which right now is set to the
> > size of fragment.
> >
> > But the correct thing to do is to dma sync the entire page when
> > the last fragment is recycled. Hence change to using
> > page_pool_put_full_page().
>
> I am not sure if Fixes tag is needed if the blamed commit is only
> in the net-next tree. Otherwise, LGTM.
I think it would be best to provide a fixes tag in this case.
It can be done by supplying it in a response to this email thread.
(I think it needs to start at the beginning of a line.)
> Reviewed-by: Yunsheng Lin <linyunsheng@huawei.com>
>
> >
> > Link: https://lore.kernel.org/netdev/89d7ce83-cc1d-4791-87b5-6f7af29a031d@huawei.com/
> >
> > Suggested-by: Yunsheng Lin <linyunsheng@huawei.com>
> > Reviewed-by: Praveen Kaligineedi <pkaligineedi@google.com>
> > Reviewed-by: Willem de Bruijn <willemb@google.com>
> > Signed-off-by: Harshitha Ramamurthy <hramamurthy@google.com>
...
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH net-next] gve: change to use page_pool_put_full_page when recycling pages
2024-10-24 15:45 ` Simon Horman
@ 2024-10-24 17:58 ` Harshitha Ramamurthy
2024-10-25 9:09 ` Simon Horman
0 siblings, 1 reply; 6+ messages in thread
From: Harshitha Ramamurthy @ 2024-10-24 17:58 UTC (permalink / raw)
To: Simon Horman
Cc: Yunsheng Lin, Praveen Kaligineedi, netdev, davem, edumazet, kuba,
pabeni, andrew+netdev, willemb, jeroendb, shailend, ziweixiao,
jacob.e.keller
On Thu, Oct 24, 2024 at 8:45 AM Simon Horman <horms@kernel.org> wrote:
>
> On Thu, Oct 24, 2024 at 10:36:02AM +0800, Yunsheng Lin wrote:
> > On 2024/10/24 6:11, Praveen Kaligineedi wrote:
> > > From: Harshitha Ramamurthy <hramamurthy@google.com>
> > >
> > > The driver currently uses page_pool_put_page() to recycle
> > > page pool pages. Since gve uses split pages, if the fragment
> > > being recycled is not the last fragment in the page, there
> > > is no dma sync operation. When the last fragment is recycled,
> > > dma sync is performed by page pool infra according to the
> > > value passed as dma_sync_size which right now is set to the
> > > size of fragment.
> > >
> > > But the correct thing to do is to dma sync the entire page when
> > > the last fragment is recycled. Hence change to using
> > > page_pool_put_full_page().
> >
> > I am not sure if Fixes tag is needed if the blamed commit is only
> > in the net-next tree. Otherwise, LGTM.
>
> I think it would be best to provide a fixes tag in this case.
> It can be done by supplying it in a response to this email thread.
> (I think it needs to start at the beginning of a line.)
Thanks Yunsheng and Simon. I wasn't sure since this patch was targeted
for net-next. I have provided a Fixes tag below.
>
> > Reviewed-by: Yunsheng Lin <linyunsheng@huawei.com>
> >
> > >
> > > Link: https://lore.kernel.org/netdev/89d7ce83-cc1d-4791-87b5-6f7af29a031d@huawei.com/
> > >
Fixes: ebdfae0d377b ("gve: adopt page pool for DQ RDA mode")
> > > Suggested-by: Yunsheng Lin <linyunsheng@huawei.com>
> > > Reviewed-by: Praveen Kaligineedi <pkaligineedi@google.com>
> > > Reviewed-by: Willem de Bruijn <willemb@google.com>
> > > Signed-off-by: Harshitha Ramamurthy <hramamurthy@google.com>
>
> ...
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH net-next] gve: change to use page_pool_put_full_page when recycling pages
2024-10-24 17:58 ` Harshitha Ramamurthy
@ 2024-10-25 9:09 ` Simon Horman
0 siblings, 0 replies; 6+ messages in thread
From: Simon Horman @ 2024-10-25 9:09 UTC (permalink / raw)
To: Harshitha Ramamurthy
Cc: Yunsheng Lin, Praveen Kaligineedi, netdev, davem, edumazet, kuba,
pabeni, andrew+netdev, willemb, jeroendb, shailend, ziweixiao,
jacob.e.keller
On Thu, Oct 24, 2024 at 10:58:47AM -0700, Harshitha Ramamurthy wrote:
> On Thu, Oct 24, 2024 at 8:45 AM Simon Horman <horms@kernel.org> wrote:
> >
> > On Thu, Oct 24, 2024 at 10:36:02AM +0800, Yunsheng Lin wrote:
> > > On 2024/10/24 6:11, Praveen Kaligineedi wrote:
> > > > From: Harshitha Ramamurthy <hramamurthy@google.com>
> > > >
> > > > The driver currently uses page_pool_put_page() to recycle
> > > > page pool pages. Since gve uses split pages, if the fragment
> > > > being recycled is not the last fragment in the page, there
> > > > is no dma sync operation. When the last fragment is recycled,
> > > > dma sync is performed by page pool infra according to the
> > > > value passed as dma_sync_size which right now is set to the
> > > > size of fragment.
> > > >
> > > > But the correct thing to do is to dma sync the entire page when
> > > > the last fragment is recycled. Hence change to using
> > > > page_pool_put_full_page().
> > >
> > > I am not sure if Fixes tag is needed if the blamed commit is only
> > > in the net-next tree. Otherwise, LGTM.
> >
> > I think it would be best to provide a fixes tag in this case.
> > It can be done by supplying it in a response to this email thread.
> > (I think it needs to start at the beginning of a line.)
>
> Thanks Yunsheng and Simon. I wasn't sure since this patch was targeted
> for net-next. I have provided a Fixes tag below.
Thanks. FWIIW, the tag looks correct to me.
> >
> > > Reviewed-by: Yunsheng Lin <linyunsheng@huawei.com>
> > >
> > > >
> > > > Link: https://lore.kernel.org/netdev/89d7ce83-cc1d-4791-87b5-6f7af29a031d@huawei.com/
> > > >
> Fixes: ebdfae0d377b ("gve: adopt page pool for DQ RDA mode")
> > > > Suggested-by: Yunsheng Lin <linyunsheng@huawei.com>
> > > > Reviewed-by: Praveen Kaligineedi <pkaligineedi@google.com>
> > > > Reviewed-by: Willem de Bruijn <willemb@google.com>
> > > > Signed-off-by: Harshitha Ramamurthy <hramamurthy@google.com>
> >
> > ...
>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH net-next] gve: change to use page_pool_put_full_page when recycling pages
2024-10-23 22:11 [PATCH net-next] gve: change to use page_pool_put_full_page when recycling pages Praveen Kaligineedi
2024-10-24 2:36 ` Yunsheng Lin
@ 2024-10-31 1:10 ` patchwork-bot+netdevbpf
1 sibling, 0 replies; 6+ messages in thread
From: patchwork-bot+netdevbpf @ 2024-10-31 1:10 UTC (permalink / raw)
To: Praveen Kaligineedi
Cc: netdev, davem, edumazet, kuba, pabeni, andrew+netdev, willemb,
jeroendb, shailend, hramamurthy, ziweixiao, linyunsheng,
jacob.e.keller
Hello:
This patch was applied to netdev/net-next.git (main)
by Jakub Kicinski <kuba@kernel.org>:
On Wed, 23 Oct 2024 15:11:41 -0700 you wrote:
> From: Harshitha Ramamurthy <hramamurthy@google.com>
>
> The driver currently uses page_pool_put_page() to recycle
> page pool pages. Since gve uses split pages, if the fragment
> being recycled is not the last fragment in the page, there
> is no dma sync operation. When the last fragment is recycled,
> dma sync is performed by page pool infra according to the
> value passed as dma_sync_size which right now is set to the
> size of fragment.
>
> [...]
Here is the summary with links:
- [net-next] gve: change to use page_pool_put_full_page when recycling pages
https://git.kernel.org/netdev/net-next/c/4ddf7ccfdf70
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2024-10-31 1:10 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-10-23 22:11 [PATCH net-next] gve: change to use page_pool_put_full_page when recycling pages Praveen Kaligineedi
2024-10-24 2:36 ` Yunsheng Lin
2024-10-24 15:45 ` Simon Horman
2024-10-24 17:58 ` Harshitha Ramamurthy
2024-10-25 9:09 ` Simon Horman
2024-10-31 1:10 ` patchwork-bot+netdevbpf
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).