[Dovecot] How to get rid of locks

Jim Maenpaa jim+dovecot at ohwell.org
Sat Apr 7 22:52:19 EEST 2007


On Apr 7, 2007, at 12:30, Timo Sirainen wrote:

> Although Dovecot is already read-lockless and it uses only short- 
> lived write locks, it's be really nice to just get rid of the  
> locking completely. :)
>
> I just figured out that O_APPEND is pretty great. If the operating  
> system updates seek position after writing to a file opened with  
> O_APPEND, writes to Dovecot's transaction log file can be made  
> lockless. I see that this works with Linux and Solaris, but not  
> with OS X. Could you BSD people try if it works there? http:// 
> dovecot.org/tmp/append.c and see if it says "offset = 0" (bad) or  
> non-zero (yay). The O_APPEND at least doesn't work with NFS, so  
> it'll have to be optional anyway.

I tested on Mac OS X. Works on Intel (offset = 5), but not PowerPC  
(offset = 0)... Both are running 10.4.9.

Kernel versions:

Darwin Kernel Version 8.9.0: Thu Feb 22 20:54:07 PST 2007;  
root:xnu-792.17.14~1/RELEASE_PPC
Darwin Kernel Version 8.9.1: Thu Feb 22 20:55:00 PST 2007;  
root:xnu-792.18.15~1/RELEASE_I386

-jim



More information about the dovecot mailing list