Re: "movb" for spin-unlock (was Re: namei() query)

From: Horst von Brand (vonbrand@sleipnir.valparaiso.cl)
Date: Sat Apr 22 2000 - 21:45:15 EST


Oliver Xymoron <oxymoron@waste.org> said:
> On Sat, 22 Apr 2000, Jamie Lokier wrote:
> > I'd really like a tool that can check for missing locks, redundant
> > locks, operations that should be atomic, missing memory barriers, that
> > sort of thing. It's not easy is it? :-)

> It's provably equivalent to the halting problem, assuming you even have
> enough info in the source to automatically identify things that need
> atomicity. Anything with recursion or coroutines is liable to make it very
> unhappy.

To solve it, sure. To check if it is OK, or warn where it might not be, is
another matter. And if it is very complex (so simple checks won't work), no
human will be able to wrap her brain around it either. I wouldn't worrry
too much here. At most the tool should be able to be asked: "Is the foo
lock taken and released on all paths through bar()?" No need for the tool
to anticipate Linus' architecture design and tell you the foo lock is
needed there.

-- 
Horst von Brand                             vonbrand@sleipnir.valparaiso.cl
Casilla 9G, Viņa del Mar, Chile                               +56 32 672616

- 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/



This archive was generated by hypermail 2b29 : Sun Apr 23 2000 - 21:00:21 EST