[Openib-windows] Adding an environment variable for determining the initial CQ size

Fabian Tillier ftillier at silverstorm.com
Mon Jul 17 16:20:15 PDT 2006


Hi Tzachi,

On 7/17/06, Tzachi Dar <tzachid at mellanox.co.il> wrote:
> Hi Fab,
>
> The reason that I have called it a leak, is that currently, if some
> application opens 500 connections, and than closes them, what will
> happen is that 5 threads will be created and once all sockets are
> destroyed, there will be 5 threads with empty sockets. If that
> application will open another 500 connections, 4 new threads will be
> opened, and the numbers will continue growing forever. So this is some
> kind of a leak, as I understand this.

Ahh, I follow what you meant.

> It seems that the only way to solve this problem is to create a
> mechanism that will make sure that no new CQ and CQ thread is used until
> there is no place in other CQs.
>
> This requires putting the CQ's in some list and this problem will
> probably have to be solved in any case, some time in the future.

The CQ are already in a list, so putting together something to go
through the list and only create a new thread if all existing CQs are
full should be fairly straight forward.  I'll put together something
to handle this, as this should be done even if resize CQ is supported
since the CQ could grow up to the limits of the HCA.

> Currently, the situation is that the user has no mitigation to this
> problem at all. With the fix that I suggested, you will be able to set
> the number of connections and this does give some way for a user to work
> well. Of course, when the CQ's will be resized as needed, this will give
> a better mitigation to the problem but not solve it anyway.

Agreed.

> In any case there is not much to argue. I believe that we can agree that
> the chances of a real user reaching this problem is small. The fix is
> not really a fix. We can always compile this for him, and on the other
> hand the risk in this patch is very small.

Stay tuned for a proper fix.  With a fix to use any available CQ, do
you think we still need the default to be 500?

Thanks,

- Fab




More information about the ofw mailing list