prov/psm: cq_read optimization, tag bit reservation rework, and a few bug fixes

Yes. When the CQ is empty, poll PSM for more completions; otherwise, dequeue from the CQ.

From: Sean Hefty [mailto:notifications@github.com]
Sent: Thursday, October 16, 2014 8:28 PM
To: ofiwg/libfabric
Cc: Xiong, Jianxin
Subject: Re: [libfabric] prov/psm: cq_read optimization, tag bit reservation rework, and a few bug fixes (#193)


In prov/psm/src/psmx_cq.c:

>

>      cq_priv = container_of(cq, struct psmx_fid_cq, cq);

>      assert(cq_priv->domain);

>

> -    cq_priv->poll_am_before_mq = !cq_priv->poll_am_before_mq;

> -    if (cq_priv->poll_am_before_mq)

> -            psmx_am_progress(cq_priv->domain);

> -

> -    psmx_cq_poll_mq(cq_priv, cq_priv->domain);

> +    if (PSMX_CQ_EMPTY(cq_priv)) {

> +            ret = psmx_cq_poll_mq(cq_priv, cq_priv->domain,

> +                                 (struct psmx_cq_event *)buf, count, src_addr);

> +            if (ret > 0)

> +                   return ret;

Is this correct? If the CQ is empty, you poll?

—
Reply to this email directly or view it on GitHub<https://github.com/ofiwg/libfabric/pull/193/files#r19000147>.