[openib-general] [PATCH] opensm: make cl_atomic functions atomic
Hal Rosenstock
halr at voltaire.com
Mon Mar 6 03:34:52 PST 2006
On Sun, 2006-03-05 at 11:59, Sasha Khapyorsky wrote:
> Hi again,
>
> On 01:49 Fri 03 Mar , Sasha Khapyorsky wrote:
> >
> > complib's cl_atomic_() functions are not atomic in current implementation,
> > they use static per function locks so race is possible between different
> > functions (for example between _inc() and _dec()). Such races are pretty
> > reproducible in practice - for example it is used to inc/decrement mad
> > counters in opensm.
> >
> > This patch is fast workaround. I think we will need to review usage and
> > implementation of atomic stuff in opensm for better solution.
> >
>
> The same patch but updated against recent SVN.
>
> Sasha.
>
>
> This is workaround for broken cl_atomic_() stuff used in complib/OpenSM:
> it replaces per function static locks by one globally shared lock.
> In long term we will need better solution IMO.
>
> Signed-off-by: Sasha Khapyorsky <sashak at voltaire.com>
Thanks. Applied (to both trunk and 1.0 branch).
-- Hal
More information about the general
mailing list