* Re: Poll CQ syncing problem [not found] ` <3ba1baab-e2ac-358d-3b3b-ff4a27405c93@mellanox.com> @ 2017-03-01 14:51 ` Christoph Hellwig 2017-03-01 15:28 ` Noa Osherovich 0 siblings, 1 reply; 2+ messages in thread From: Christoph Hellwig @ 2017-03-01 14:51 UTC (permalink / raw) To: Noa Osherovich; +Cc: hch, sagi, linux-rdma, Majd Dibbiny, tj, linux-kernel On Wed, Mar 01, 2017 at 04:30:26PM +0200, Noa Osherovich wrote: > Analysis: > Since ib_comp_wq isn't single threaded, two works can run in parallel for the same CQ, > executing __ib_process_cq. They shouldn't. Each CQ has a single work_struct, and any given work_struct should only be executing at once: "Note that the flag ``WQ_NON_REENTRANT`` no longer exists as all workqueues are now non-reentrant - any work item is guaranteed to be executed by at most one worker system-wide at any given time." > Since this function isn't thread safe and the wc array is shared, it causes a data corruption > which eventually crashes in the MAD layer due to a double list_del of the same element. This should not be the case. What kernel version are you testing and does it contain any patches touching core kernel code? ^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Poll CQ syncing problem 2017-03-01 14:51 ` Poll CQ syncing problem Christoph Hellwig @ 2017-03-01 15:28 ` Noa Osherovich 0 siblings, 0 replies; 2+ messages in thread From: Noa Osherovich @ 2017-03-01 15:28 UTC (permalink / raw) To: Christoph Hellwig; +Cc: sagi, linux-rdma, Majd Dibbiny, tj, linux-kernel On 3/1/2017 4:51 PM, Christoph Hellwig wrote: > On Wed, Mar 01, 2017 at 04:30:26PM +0200, Noa Osherovich wrote: >> Analysis: >> Since ib_comp_wq isn't single threaded, two works can run in parallel for the same CQ, >> executing __ib_process_cq. > They shouldn't. Each CQ has a single work_struct, and any given work_struct > should only be executing at once: > > "Note that the flag ``WQ_NON_REENTRANT`` no longer exists as all > workqueues are now non-reentrant - any work item is guaranteed to be > executed by at most one worker system-wide at any given time." > >> Since this function isn't thread safe and the wc array is shared, it causes a data corruption >> which eventually crashes in the MAD layer due to a double list_del of the same element. > This should not be the case. What kernel version are you testing and does > it contain any patches touching core kernel code? Thanks Christoph for the quick response. Currently we see this only in old kernels. I'll investigate this more and update. ^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-03-01 15:46 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <b4355d22-fc79-c860-de8a-5a4d468c884d@mellanox.com>
[not found] ` <3ba1baab-e2ac-358d-3b3b-ff4a27405c93@mellanox.com>
2017-03-01 14:51 ` Poll CQ syncing problem Christoph Hellwig
2017-03-01 15:28 ` Noa Osherovich
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox