lkml.org 
[lkml]   [2015]   [Nov]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH 2/9] IB: add a proper completion queue abstraction
    On Mon, Nov 23, 2015 at 01:01:36PM -0700, Jason Gunthorpe wrote:
    > Okay, having now read the whole thing, I think I see the flow now. I don't
    > see any holes in the above, other than it is doing a bit more work
    > than it needs in some edges cases because it doesn't know if the CQ is
    > actually empty or not.
    >
    > > > > + completed = __ib_process_cq(cq, IB_POLL_BUDGET_WORKQUEUE);
    > > > > + if (completed >= IB_POLL_BUDGET_WORKQUEUE ||
    > > > > + ib_req_notify_cq(cq, IB_POLL_FLAGS) > 0)
    > > > > + queue_work(ib_comp_wq, &cq->work);
    > > >
    > > > Same comment here..
    > >
    > > Same here - we only requeue the work item if either we processed all of
    > > our budget, or ib_req_notify_cq with IB_CQ_REPORT_MISSED_EVENTS told
    > > us that we need to poll again.
    >
    > I find the if construction hard to read, but yes, it looks OK.

    If you're got suggestions to improve the flow please send them my way.
    I'm not entirely happy with it, but couldn't come up with a better idea.


    \
     
     \ /
      Last update: 2015-11-23 22:21    [W:3.906 / U:0.084 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site