diff mbox

ibv_rc_pingpong, rping, and other tools hang with Linux 4.10.0 and rdma-core 13

Message ID 20170227162916.GC5891@obsidianresearch.com (mailing list archive)
State Not Applicable
Headers show

Commit Message

Jason Gunthorpe Feb. 27, 2017, 4:29 p.m. UTC
On Sun, Feb 26, 2017 at 06:09:34PM +0200, Yonatan Cohen wrote:

> I bisected the rdma-core library and figured out that the following commit
> introduced this regression:
> 6b26a9e24739 Use C11 atomics instead of wmb/rmb macros for CPU-only atomics
> 
> I haven't debugged this yet and would appreciate Jason's input.

Oops, I think I typo'd it here:


My bad

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

Comments

Majd Dibbiny Feb. 27, 2017, 8:38 p.m. UTC | #1
> On Feb 27, 2017, at 7:09 PM, Jason Gunthorpe <jgunthorpe@obsidianresearch.com> wrote:
> 
>> On Sun, Feb 26, 2017 at 06:09:34PM +0200, Yonatan Cohen wrote:
>> 
>> I bisected the rdma-core library and figured out that the following commit
>> introduced this regression:
>> 6b26a9e24739 Use C11 atomics instead of wmb/rmb macros for CPU-only atomics
>> 
>> I haven't debugged this yet and would appreciate Jason's input.
> 
> Oops, I think I typo'd it here:
> 
> --- a/providers/rxe/rxe_queue.h
> +++ b/providers/rxe/rxe_queue.h
> @@ -37,15 +37,16 @@
> #ifndef H_RXE_PCQ
> #define H_RXE_PCQ
> 
> +#include <stdatomic.h>
> +
> /* MUST MATCH kernel struct rxe_pqc in rxe_queue.h */
> struct rxe_queue {
>        uint32_t                log2_elem_size;
>        uint32_t                index_mask;
>        uint32_t                pad_1[30];
> -       volatile uint32_t       producer_index;
> +       _Atomic(uint32_t)       producer_index;
>        uint32_t                pad_2[31];
> -       volatile uint32_t       consumer_index;
> -       uint32_t                pad_3[31];
> +       _Atomic(uint32_t)       consumer_index;
> 
> 
> Ie deleted pad_3[31] by mistake!
> 
> My bad
Thanks Jason for looking into it.
Can you please submit this fix to rdma-core?
> 
> Jason
> --
> To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

--- a/providers/rxe/rxe_queue.h
+++ b/providers/rxe/rxe_queue.h
@@ -37,15 +37,16 @@ 
 #ifndef H_RXE_PCQ
 #define H_RXE_PCQ
 
+#include <stdatomic.h>
+
 /* MUST MATCH kernel struct rxe_pqc in rxe_queue.h */
 struct rxe_queue {
        uint32_t                log2_elem_size;
        uint32_t                index_mask;
        uint32_t                pad_1[30];
-       volatile uint32_t       producer_index;
+       _Atomic(uint32_t)       producer_index;
        uint32_t                pad_2[31];
-       volatile uint32_t       consumer_index;
-       uint32_t                pad_3[31];
+       _Atomic(uint32_t)       consumer_index;


Ie deleted pad_3[31] by mistake!