Re: spin_unlock optimization(i386)

Erich Boleyn (esboleyn@ichips.intel.com)
Wed, 01 Dec 1999 10:19:27 -0800


> uhm, brown paperbag to me. The overflow constant has to be longer than
> random interruptions happening to program execution, otherwise the counter
> might wrap around in the middle of:
>
> b = data2;
> a = data1;
>
> if the thread is interrupted after the first load, then 'data1' might just
> continue going upwards, and in fact it might also wrap.
>
> this means that the simplest way to handle this is to exit when the wrap
> happens, it runs long enough.

Yes.

Erich Boleyn
PMD IA32 Architecture
Intel

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/