[ofa-general] Re: [PATCH for-2.6.22] IB/cm: improve local id allocation
Roland Dreier
rdreier at cisco.com
Mon May 21 06:54:24 PDT 2007
> IB/cm uses idr for local id allocations, with a running counter
> as start_id. This fails to generate distinct ids in the scenario where
> 1. An id is constantly created and destroyed
> 2. A chunk of ids just beyond the current next_id value is occupied
>
> This in turn leads to an increased chance of connection request being mis-detected
> as a duplicate, sometimes for several retries, until next_id gets past
> the block of allocated ids. This has been observed in practice.
>
> As a fix, remember the last id allocated and start immediately above it.
OK I guess but this needs some explanation about why the impact is so
severe we want to merge it after rc2 is already out.
> + next_id = (unsigned)id + 1;
what happens when this wraps and becomes negative?
in fact the idr stuff all works with plain signed ints -- could
idr_get_new() ever give a negative id? (too lazy too look at the
source right now)
- R.
More information about the general
mailing list