Thread (37 messages) 37 messages, 7 authors, 2018-03-19

RE: [PATCH v3 18/18] infiniband: cxgb4: Eliminate duplicate barriers on weakly-ordered archs

From: Steve Wise <hidden>
Date: 2018-03-16 23:04:43
Also in: linux-arm-kernel, linux-arm-msm, linux-rdma, lkml

On Fri, Mar 16, 2018 at 04:05:10PM -0500, Steve Wise wrote:
quoted
quoted
Code includes wmb() followed by writel(). writel() already has a
barrier
quoted
on
quoted
some architectures like arm64.

This ends up CPU observing two barriers back to back before executing
the
quoted
quoted
register write.

Since code already has an explicit barrier call, changing writel() to
writel_relaxed().

Signed-off-by: Sinan Kaya <redacted>
NAK - This isn't correct for PowerPC.  For PowerPC, writeX_relaxed() is
just
quoted
writeX().
?? Why is changing writex() to writeX() a NAK then?
Because I want it correct for PPC as well.
quoted
I was just looking at this with Chelsio developers, and they said the
writeX() should be replaced with __raw_writeX(), not writeX_relaxed(),
to
quoted
get rid of the extra barrier for all architectures.
That doesn't seem semanticaly sane.

__raw_writeX() should not appear in driver code, IMHO. Only the arch
code can know what the exact semantics of that accessor are..

If ppc can't use writel_relaxed to optimize then we probably need yet
another io accessor semantic defined :(

Anybody understand why the PPC implementation of writeX_relaxed() isn't
relaxed?


Steve.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help