Subject: NetBSD master CVS tree commits
To: None <source-changes@NetBSD.ORG>
From: None <source@NetBSD.ORG>
List: source-changes
Date: 11/10/1996 06:00:01
thorpej
Sat Nov 9 21:58:38 PST 1996
Update of /cvsroot/src/sys/kern
In directory netbsd1:/var/slash-tmp/cvs-serv3073
Modified Files:
uipc_socket2.c
Log Message:
Optimization of soqinsque() and soqremque():
Keep queue of pending sockets in a double linked list. Previously,
a singly linked list was used, giving O(N) insertion/deletion times,
and was a major time consumer for sockets with large pending queues.
The double linked list give O(C) insertion/deletion times with only
a small cost in complexity.
Since a socket can be on, at most, one queue at a time, both so_q and
so_q0 can safely be used as (forward and backward, respectively) queue
pointers.
Submitted my Matt Thomas <matt@3am-software.com>, a long time ago.
(Geez, I've been running with this patch for _months_, and had completely
forgotten about it!)