On Mon, Oct 29, 2012 at 4:45 PM, Albert Chu <[email protected]> wrote:
> @@ -525,8 +525,8 @@ static void cc_poller_send(osm_congestion_control_t *p_cc,
> status = osm_vendor_send(p_cc->bind_handle, p_madw, TRUE);
> if (status == IB_SUCCESS) {
> cl_atomic_inc(&p_cc->outstanding_mads_on_wire);
> - if (p_cc->outstanding_mads_on_wire >
> - (int32_t)p_opt->cc_max_outstanding_mads)
> + while (p_cc->outstanding_mads_on_wire >
> + (int32_t)p_opt->cc_max_outstanding_mads)
> cl_event_wait_on(&p_cc->sig_mads_on_wire_continue,
> EVENT_NO_TIMEOUT,
> TRUE);
I've never looked at the opensm code -- I'm just guessing based on this patch.
But is this (both original and patched) code susceptible to a missed
wakeup race?
ie
if (outstanding_mads > max) // <-- decide to go to sleep here
// other thread signals wakeup, we're not asleep yet
cl_event_wait_on(...); // <-- we've already missed the wakeup,
sleep forever.
- R.
--
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