tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: pserialized queue(9)



Taylor R Campbell <campbell+netbsd-tech-kern%mumble.net@localhost> wrote:
> The attached patch adds _PSZ variants to all the insert, remove, and
> foreach operations in <sys/queue.h> to issue the necessary store
> barriers, for insert, and data-dependent load barriers, for foreach.
> 
> <...>

Please do not.  In practice, we only need singly-linked list which is
trivial to open-code and apart from data dependency memory barrier for
Alpha there is nothing to abstract.  Any other cases of locklist list
use generally do not fit into the existing queue(3) macros; this API
is quite dated by now and I do not forsee any use of such API around
pserialize(9) (it is also poorly named since one may as well use other
techniques).

In contrast to these useless wrappers, it would be useful to have an
implementation of atomic doubly-linked (and under that API you could
add a wrapper for the singly-linked list).  Note that the reclamation
mechanism does not have to be a concern of such atomic list APIs.

-- 
Mindaugas


Home | Main Index | Thread Index | Old Index