> Subject: Re: [PATCH for-rc] IB/hfi1: Insure pq is not left on waitlist > > The only place that uses seqlock in infiniband is in hfi1 > > It only calls seqlock_init and write_seqlock > > Never read_seqlock The sdma code uses read_seqbegin() and read_seq_retry() to avoid the spin that is in that is in read_seqlock(). The two calls together allow for detecting a race where the interrupt handler detects if the base level submit routines have enqueued to a waiter list due to a descriptor shortage concurrently with the this interrupt handler. The full write_seqlock() is gotten when the list is not empty and the req_seq_retry() detects when a list entry might have been added. SDMA interrupts frequently encounter no waiters, so the lock only slows down the interrupt handler. See sdma_desc_avail() for details. > Please clean this mess too. The APIs associated with SDMA and iowait are pretty loose and we will clean the up in a subsequent patch series. The nature of the locking should not bleed out to the client code of SDMA. We will adjust the commit message to indicate this. > Also s/insure/ensure/, right? Will Fix. Mike