> That makes me wonder how it is prevented that two CM callbacks for the
> same CM ID run concurrently on different CPUs ?

The callback code ends up looking like this:

        ret = atomic_inc_and_test(&cm_id_priv->work_count);
        if (!ret)
                list_add_tail(&work->list, &cm_id_priv->work_list);
        spin_unlock_irq(&cm_id_priv->lock);

        if (ret)
                cm_process_work(cm_id_priv, work);

Only 1 thread will end up invoking callbacks to the user.  Other events end up 
being queued on the work_list for a given id.

- Sean
N�����r��y����b�X��ǧv�^�)޺{.n�+����{��ٚ�{ay�ʇڙ�,j��f���h���z��w���
���j:+v���w�j�m��������zZ+�����ݢj"��!�i

Reply via email to