Re: [PATCH][RFC] Lightweight user-level semaphores

Alan Cox (alan@lxorguk.ukuu.org.uk)
Fri, 11 Jan 2002 17:03:45 +0000 (GMT)


> Rusty's idea is nice (though I think it'd be better
> with a filesystem than a device, so you can share
> names rather than file descriptors) but the page per
> lock seems like rather too much overhead.

I don't think its a big problem. A page gets you 256 locks or whatever the
number ends up as. For the case where you have many fine grained locks
between a group of threads thats great. You just parcel them out. If its
two processes just wanting a lock between them, well they get a page with
room for 256 lock objects, but they only want one. That doesn't matter.
Its one page, if they need two or two hundred locks its stil one page.

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