[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <8e1471fdcaed4f46825cd8ff112a8c36@baidu.com>
Date: Wed, 29 Jul 2020 06:20:47 +0000
From: "Li,Rongqing" <lirongqing@...du.com>
To: Jakub Kicinski <kuba@...nel.org>,
Tony Nguyen <anthony.l.nguyen@...el.com>
CC: "davem@...emloft.net" <davem@...emloft.net>,
"netdev@...r.kernel.org" <netdev@...r.kernel.org>,
"nhorman@...hat.com" <nhorman@...hat.com>,
"sassmann@...hat.com" <sassmann@...hat.com>,
"jeffrey.t.kirsher@...el.com" <jeffrey.t.kirsher@...el.com>,
Andrew Bowers <andrewx.bowers@...el.com>
Subject: 答复: [net-next 2/6] i40e: prefetch struct page of Rx buffer conditionally
> -----邮件原件-----
> 发件人: Jakub Kicinski [mailto:kuba@...nel.org]
> 发送时间: 2020年7月29日 4:14
> 收件人: Tony Nguyen <anthony.l.nguyen@...el.com>
> 抄送: davem@...emloft.net; Li,Rongqing <lirongqing@...du.com>;
> netdev@...r.kernel.org; nhorman@...hat.com; sassmann@...hat.com;
> jeffrey.t.kirsher@...el.com; Andrew Bowers <andrewx.bowers@...el.com>
> 主题: Re: [net-next 2/6] i40e: prefetch struct page of Rx buffer conditionally
>
> On Tue, 28 Jul 2020 12:08:38 -0700 Tony Nguyen wrote:
> > From: Li RongQing <lirongqing@...du.com>
> >
> > page_address() accesses struct page only when WANT_PAGE_VIRTUAL or
> > HASHED_PAGE_VIRTUAL is defined, otherwise it returns address based on
> > offset, so we prefetch it conditionally
> >
> > Signed-off-by: Li RongQing <lirongqing@...du.com>
> > Tested-by: Andrew Bowers <andrewx.bowers@...el.com>
> > Signed-off-by: Tony Nguyen <anthony.l.nguyen@...el.com>
> > ---
> > drivers/net/ethernet/intel/i40e/i40e_txrx.c | 2 ++
> > 1 file changed, 2 insertions(+)
> >
> > diff --git a/drivers/net/ethernet/intel/i40e/i40e_txrx.c
> > b/drivers/net/ethernet/intel/i40e/i40e_txrx.c
> > index 3e5c566ceb01..5d408fe26063 100644
> > --- a/drivers/net/ethernet/intel/i40e/i40e_txrx.c
> > +++ b/drivers/net/ethernet/intel/i40e/i40e_txrx.c
> > @@ -1953,7 +1953,9 @@ static struct i40e_rx_buffer
> *i40e_get_rx_buffer(struct i40e_ring *rx_ring,
> > struct i40e_rx_buffer *rx_buffer;
> >
> > rx_buffer = i40e_rx_bi(rx_ring, rx_ring->next_to_clean);
> > +#if defined(WANT_PAGE_VIRTUAL) || defined(HASHED_PAGE_VIRTUAL)
> > prefetchw(rx_buffer->page);
Maybe I change prefetchw to prefetch.
refcount of rx_buffer page will be added here originally,
so prefetchw is needed, but after commit 1793668c3b8c
("i40e/i40evf: Update code to better handle incrementing page count"),
and refcount is not added everytime, so change prefetchw
as prefetch,
> > +#endif
>
> Looks like something that belongs in a common header not (potentially
> multiple) C sources.
Not clear, how should I change?
-Li
Powered by blists - more mailing lists