netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jakub Kicinski <kuba@kernel.org>
To: Lijun Pan <lijunp213@gmail.com>
Cc: Lijun Pan <ljp@linux.ibm.com>, netdev@vger.kernel.org
Subject: Re: [PATCH net 2/3] ibmvnic: remove unnecessary rmb() inside ibmvnic_poll
Date: Mon, 25 Jan 2021 12:35:07 -0800	[thread overview]
Message-ID: <20210125123507.7cdb061a@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com> (raw)
In-Reply-To: <CAOhMmr4r0OvSvbr68B8483mwJKtm=8BjiYUQa3gtin8ajZQ-5w@mail.gmail.com>

On Sun, 24 Jan 2021 22:38:02 -0600 Lijun Pan wrote:
> On Sat, Jan 23, 2021 at 11:11 PM Jakub Kicinski <kuba@kernel.org> wrote:
> > On Thu, 21 Jan 2021 00:17:09 -0600 Lijun Pan wrote:  
> > > rmb() was introduced to load rx_scrq->msgs after calling
> > > pending_scrq(). Now since pending_scrq() itself already
> > > has dma_rmb() at the end of the function, rmb() is
> > > duplicated and can be removed.
> > >
> > > Fixes: ec20f36bb41a ("ibmvnic: Correctly re-enable interrupts in NAPI polling routine")
> > > Signed-off-by: Lijun Pan <ljp@linux.ibm.com>  
> >
> > rmb() is a stronger barrier than dma_rmb()  
> 
> Yes. I think the weaker dma_rmb() here is enough.
> And I let it reuse the dma_rmb() in the pending_scrq().
> 
> >
> > also again, I don't see how this fixes any bugs  
> 
> I will send to net-next if you are ok with it.

If there is consensus at IBM that the first 2 changes are an
improvement you can drop the Fixes tags and resubmit to net-next.

In patch 3 it looks like the dma_rmb() may indeed be missing so that
one could go to net, but I don't think the dma_wmb() is needed,
especially not where you put it. I think dma_wmb() is only needed
before the device is notified that new buffer was posted, not on
completion.

  reply	other threads:[~2021-01-25 20:36 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-21  6:17 [PATCH net 0/3] fixes the memory barrier for SCRQ/CRQ entry Lijun Pan
2021-01-21  6:17 ` [PATCH net 1/3] ibmvnic: rework to ensure SCRQ entry reads are properly ordered Lijun Pan
2021-01-24  5:08   ` Jakub Kicinski
2021-01-25  4:34     ` Lijun Pan
2021-01-21  6:17 ` [PATCH net 2/3] ibmvnic: remove unnecessary rmb() inside ibmvnic_poll Lijun Pan
2021-01-24  5:09   ` Jakub Kicinski
2021-01-25  4:38     ` Lijun Pan
2021-01-25 20:35       ` Jakub Kicinski [this message]
2021-01-21  6:17 ` [PATCH net 3/3] ibmvnic: Ensure that CRQ entry read/write are correctly ordered Lijun Pan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210125123507.7cdb061a@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com \
    --to=kuba@kernel.org \
    --cc=lijunp213@gmail.com \
    --cc=ljp@linux.ibm.com \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).