On Fri, Nov 6, 2009 at 3:54 AM, Philip Pokorny <[email protected]> wrote: > > On Thu, Nov 5, 2009 at 2:27 PM, Vladislav Bolkhovitin <[email protected]> wrote: > > > > Philip Pokorny, on 11/05/2009 11:51 AM wrote: > >> > >> Chris Worley asked that we post this to scst and linux-rdma lists for > >> discussion. > >> > > > > Looks like ib_post_send() in srpt_perform_rdmas() returned ENOMEM and then > > srpt_xfer_data() "forgot" to unmapped corresponding SG with all related > > consequences. > > I would like to add the following to the above analysis: > * The function srpt_xfer_data() calls srpt_perform_rdmas(). The last > function calls ib_post_send() repeatedly. ib_post_send() can fail > because the work queue on which the send request should be posted is > full. When processing an sg list with multiple entries, it is possible > that some entries get posted to the work queue and some not. > * If this happens, the last send posted on the work queue won't > trigger a completion event (this is a bug in srpt_perform_rdmas()). > * If the srpt_perform_rdmas() call inside srpt_xfer_data() fails, it > is possible that some of the sg list entries have been posted on the > IB work queue and some not. So error recovery will be more complex > than just a single call to ib_dma_unmap_sg(). > > ======= > Is there something I could code up to sleep, pause or retry the calls to > ib_post_send if they fail?
Proper error handling has to be implemented in srpt_xfer_data(). Also, measures have to be taken such that no more work is posted on the IB queue than the reserved size. Which value are you using for SCST_MAX_TGT_DEV_COMMANDS (defined in scst/src/scst_priv.h) ? Bart. -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
