[ofa-general] Re: Requesting CQ notifications
Michael S. Tsirkin
mst at dev.mellanox.co.il
Wed Apr 25 21:54:09 PDT 2007
> In this case it brings up an interesting question. If the adaptor will
> only generate an event for a "new" CQE added, how do you tell that
> you've successfully polled all the CQEs that triggered the first event?
> You could continuously call ibv_poll_cq() until it returned zero, but
> this has the side effect of potentially starving other CQs in the case
> of a high CQE rate.
You can limit the number of polls by CQ size. So
<poll any number of times you like (could be 0), or until CQ is empty>
request notification
<poll up to CQ size or until CQ is empty>
solves the starvation problem, and will guarantee that no event is missed.
--
MST
More information about the general
mailing list