Re: [PATCH tip/core/rcu 16/21] drivers/infiniband: Remove now-redundant smp_read_barrier_depends()

2017-12-05 Thread Paul E. McKenney
On Tue, Dec 05, 2017 at 08:08:32AM -0700, Jason Gunthorpe wrote:
> > commit c389c98ec5f4a7aa4c36853e89801eb5ea81870e
> > Author: Paul E. McKenney 
> > Date:   Mon Nov 27 09:04:22 2017 -0800
> > 
> > drivers/infiniband: Remove now-redundant smp_read_barrier_depends()
> > 
> > The smp_read_barrier_depends() does nothing at all except on DEC Alpha,
> > and no current DEC Alpha systems use Infiniband:
> > 
> > lkml.kernel.org/r/20171023085921.jwbntptn6ictbnvj@tower
> > 
> > This commit therefore makes Infiniband depend on !ALPHA and removes
> > the now-ineffective invocations of smp_read_barrier_depends() from
> > the InfiniBand driver.
> > 
> > Please note that this patch should not be construed as my saying that
> > InfiniBand's memory ordering is correct, but rather that this patch does
> > not in any way affect InfiniBand's correctness.  In other words, the
> > result of applying this patch is bug-for-bug compatible with the 
> > original.
> > 
> > Signed-off-by: Paul E. McKenney 
> > Cc: Doug Ledford 
> > Cc: Jason Gunthorpe 
> > Cc: Richard Henderson 
> > Cc: Ivan Kokshaysky 
> > Cc: Matt Turner 
> > Cc: Michael Cree 
> > Cc: Andrea Parri 
> > Cc: 
> > Cc: 
> > [ paulmck: Removed drivers/dma/ioat/dma.c per Jason Gunthorpe's 
> > feedback. ]
> 
> Let me know if you want this patch to flow through the rdma tree..
> 
> Acked-by: Jason Gunthorpe 

I applied your ack, thank you!

Your choice as to what tree it flows through.  By default, and if all
goes well, I will push this series through -rcu and -tip during the next
merge window.

Thanx, Paul

--
To unsubscribe from this list: send the line "unsubscribe linux-alpha" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH tip/core/rcu 16/21] drivers/infiniband: Remove now-redundant smp_read_barrier_depends()

2017-12-05 Thread Jason Gunthorpe
> commit c389c98ec5f4a7aa4c36853e89801eb5ea81870e
> Author: Paul E. McKenney 
> Date:   Mon Nov 27 09:04:22 2017 -0800
> 
> drivers/infiniband: Remove now-redundant smp_read_barrier_depends()
> 
> The smp_read_barrier_depends() does nothing at all except on DEC Alpha,
> and no current DEC Alpha systems use Infiniband:
> 
>   lkml.kernel.org/r/20171023085921.jwbntptn6ictbnvj@tower
> 
> This commit therefore makes Infiniband depend on !ALPHA and removes
> the now-ineffective invocations of smp_read_barrier_depends() from
> the InfiniBand driver.
> 
> Please note that this patch should not be construed as my saying that
> InfiniBand's memory ordering is correct, but rather that this patch does
> not in any way affect InfiniBand's correctness.  In other words, the
> result of applying this patch is bug-for-bug compatible with the original.
> 
> Signed-off-by: Paul E. McKenney 
> Cc: Doug Ledford 
> Cc: Jason Gunthorpe 
> Cc: Richard Henderson 
> Cc: Ivan Kokshaysky 
> Cc: Matt Turner 
> Cc: Michael Cree 
> Cc: Andrea Parri 
> Cc: 
> Cc: 
> [ paulmck: Removed drivers/dma/ioat/dma.c per Jason Gunthorpe's feedback. 
> ]

Let me know if you want this patch to flow through the rdma tree..

Acked-by: Jason Gunthorpe 
--
To unsubscribe from this list: send the line "unsubscribe linux-alpha" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH tip/core/rcu 16/21] drivers/infiniband: Remove now-redundant smp_read_barrier_depends()

2017-12-01 Thread Paul E. McKenney
On Fri, Dec 01, 2017 at 05:11:09PM -0700, Jason Gunthorpe wrote:
> On Fri, Dec 01, 2017 at 11:51:11AM -0800, Paul E. McKenney wrote:
> > The smp_read_barrier_depends() does nothing at all except on DEC Alpha,
> > and no current DEC Alpha systems use Infiniband:
> > 
> > lkml.kernel.org/r/20171023085921.jwbntptn6ictbnvj@tower
> 
> I understand DEC Alpha has PCI, and we continue to support several
> RDMA devices that used the PCI bus.
> 
> However, the hif1, rdma vt and qib drivers modified in this patch are
> PCI-Express ONLY. So I think this idea is fine, but would revise the
> commit message to focus on PCI-E not Infiniband.

Hmmm...  It is not just the commit log, but also the Kconfig change.
I am not as worried as I might be about the few museum-piece DEC
Alpha systems suddenly sporting new RDMA PCI devices, but I am worried
about getting a more complex change right.

And if someone really does add a PCI RDMA device to their DEC Alpha,
and this patch causes them trouble, we can work out what to do about
it when and if that happens.

> >  drivers/dma/ioat/dma.c  | 2 --
> >  drivers/infiniband/Kconfig  | 1 +
> 
> Did you mean to have ioat/dma.c in this patch?

Indeed I did not, thank you for catching this!  Please see below for
updated ioat-free patch.

Thanx, Paul



commit c389c98ec5f4a7aa4c36853e89801eb5ea81870e
Author: Paul E. McKenney 
Date:   Mon Nov 27 09:04:22 2017 -0800

drivers/infiniband: Remove now-redundant smp_read_barrier_depends()

The smp_read_barrier_depends() does nothing at all except on DEC Alpha,
and no current DEC Alpha systems use Infiniband:

lkml.kernel.org/r/20171023085921.jwbntptn6ictbnvj@tower

This commit therefore makes Infiniband depend on !ALPHA and removes
the now-ineffective invocations of smp_read_barrier_depends() from
the InfiniBand driver.

Please note that this patch should not be construed as my saying that
InfiniBand's memory ordering is correct, but rather that this patch does
not in any way affect InfiniBand's correctness.  In other words, the
result of applying this patch is bug-for-bug compatible with the original.

Signed-off-by: Paul E. McKenney 
Cc: Doug Ledford 
Cc: Jason Gunthorpe 
Cc: Richard Henderson 
Cc: Ivan Kokshaysky 
Cc: Matt Turner 
Cc: Michael Cree 
Cc: Andrea Parri 
Cc: 
Cc: 
[ paulmck: Removed drivers/dma/ioat/dma.c per Jason Gunthorpe's feedback. ]

diff --git a/drivers/infiniband/Kconfig b/drivers/infiniband/Kconfig
index 98ac46ed7214..3bb6e35b0bbf 100644
--- a/drivers/infiniband/Kconfig
+++ b/drivers/infiniband/Kconfig
@@ -4,6 +4,7 @@ menuconfig INFINIBAND
depends on NET
depends on INET
depends on m || IPV6 != m
+   depends on !ALPHA
select IRQ_POLL
---help---
  Core support for InfiniBand (IB).  Make sure to also select
diff --git a/drivers/infiniband/hw/hfi1/rc.c b/drivers/infiniband/hw/hfi1/rc.c
index fd01a760259f..f527bcda4650 100644
--- a/drivers/infiniband/hw/hfi1/rc.c
+++ b/drivers/infiniband/hw/hfi1/rc.c
@@ -302,7 +302,6 @@ int hfi1_make_rc_req(struct rvt_qp *qp, struct 
hfi1_pkt_state *ps)
if (!(ib_rvt_state_ops[qp->state] & RVT_FLUSH_SEND))
goto bail;
/* We are in the error state, flush the work request. */
-   smp_read_barrier_depends(); /* see post_one_send() */
if (qp->s_last == READ_ONCE(qp->s_head))
goto bail;
/* If DMAs are in progress, we can't flush immediately. */
@@ -346,7 +345,6 @@ int hfi1_make_rc_req(struct rvt_qp *qp, struct 
hfi1_pkt_state *ps)
newreq = 0;
if (qp->s_cur == qp->s_tail) {
/* Check if send work queue is empty. */
-   smp_read_barrier_depends(); /* see post_one_send() */
if (qp->s_tail == READ_ONCE(qp->s_head)) {
clear_ahg(qp);
goto bail;
@@ -900,7 +898,6 @@ void hfi1_send_rc_ack(struct hfi1_ctxtdata *rcd,
}
 
/* Ensure s_rdma_ack_cnt changes are committed */
-   smp_read_barrier_depends();
if (qp->s_rdma_ack_cnt) {
hfi1_queue_rc_ack(qp, is_fecn);
return;
@@ -1562,7 +1559,6 @@ static void rc_rcv_resp(struct hfi1_packet *packet)
trace_hfi1_ack(qp, psn);
 
/* Ignore invalid responses. */
-   smp_read_barrier_depends(); /* see post_one_send */
if (cmp_psn(psn,