Fine-grained locking for POSIX local sockets (UNIX
domain sockets)
David Xu
davidxu at freebsd.org
Wed May 10 04:01:57 UTC 2006
Daniel Eischen wrote:
>
> On Wed, 10 May 2006, David Xu wrote:
>
>> One of the problems to implement it is that atomic operations,
>> if there are multiple integer needs to be updated by kernel,
>> userland maybe gets an inconsistent result, the way to avoid the
>> problem is using two generation numbers.
>>
>> http://gsu.linux.org.tr/~mpekmezci/kernelapi/unitedlinux/arch/x86_64/kernel/vsyscall.c.html
>>
>> check do_vgettimeofday(struct timeval * tv):
>>
>> Another problem is how you tell userland the address of the kernel
>> page ? do you use fixed address or tell it via program headers like
>> the PT_TLS set by kernel, check /usr/src/lib/libc/gen/tls.c.
>
>
> Can you not make a simple pseudo device driver and mmap the page?
>
mmap is fine if you don't care binary compatible, exporting a kernel
page which can be executed by userland is more flexible, kernel can
change it freely without having to change libc.
More information about the freebsd-current
mailing list