On Sun, Jul 31, 2011 at 2:23 AM, Jean-Yves Migeon
<jeanyves.mig...@free.fr> wrote:
> On 30.07.2011 19:01, Christos Zoulas wrote:
>> Module Name:  src
>> Committed By: christos
>> Date:         Sat Jul 30 17:01:05 UTC 2011
>>
>> Modified Files:
>>       src/sys/conf: files
>>       src/sys/kern: init_main.c kern_lwp.c kern_synch.c
>> Added Files:
>>       src/sys/kern: subr_pserialize.c
>>       src/sys/sys: pserialize.h
>>
>> Log Message:
>> Add an implementation of passive serialization as described in expired
>> US patent 4809168. This is a reader / writer synchronization mechanism,
>> designed for lock-less read operations.
>
> Interesting! What would be the direct consumers of such an
> implementation? For example, can pserialize be a drop-in replacement for
> everything that is rwlock(9) based, or are they limitations?

I plan to use this to protect the vm_physseg array. [1]  It is looked
up thousands of times in every seconds (on busy systems), performance
critical, and very rarely updated (e.g. once a month when a new device
is attached/detached).  Avoiding atomic ops in such a situation is
desirable.

Masao

[1] http://mail-index.netbsd.org/tech-kern/2010/02/08/msg007262.html

> (I am aware that passive serialization is not equivalent to RCU).
>
> I remember reading articles mentioning how "wonderful" lockless
> algorithms are, except in situation where the additional bus
> locking/atomic ops involved did not really improve the situation in
> highly concurrent systems (and could even make it worse).
>
> --
> Jean-Yves Migeon
> jeanyves.mig...@free.fr
>

Reply via email to