There is no create and destroy (init is purely userspace). There is
"this is a semapore: up it". This is a feature.
> sys_sem_down()
> sys_sem_up()
>
> /dev/usem is such an ... ioctl()-ish approach. It's a scalability problem
> as well: read()/write() has (or can have) some implicit locking that is
> imposed on the usem interface as well.
Agreed with implicit locking: good catch. Disagree with neatness: I
like finding out in advance that there's no fast semaphore support.
> Plus sys_sem_create() should do some proper resource limit management,
> pinning down an unlimited number of pages is bad.
Since pages are pinned "on demand" and a process can only do one
syscall at a time, the maximum number of pinned pages per process ==
2. Which is fine.
Will do syscall version, and see if I can actually get it to beat
fcntl locking on reasonable benchmarks (ie. tdbtorture).
Cheers!
Rusty.
PS. Nomenclature: my fiance suggested FUS (Fast Userspace
Semaphores), and I am legally obliged to agree.
-- Anyone who quotes me in their sig is an idiot. -- Rusty Russell. - 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/