Thor Lancelot Simon
2008-09-24 19:59:52 UTC
I have an in-kernel consumer of the socket API, which uses a very large
number of sockets. I don't want to maintain file structures associated
with all these sockets unless I absolutely must -- they're wasteful, and
kernel memory is at a premium.
The problem is that some of the code in the socket layer assumes that if
SS_NOFDREF is set, a socket's not long for this world and can be killed
off. This seems like a poor substitute for a real reference counter, and
mingles the semantics "has no associated file descriptor" and "is being
deallocated" besides.
I'd like to add reference counts to sockets, either manipulated under
the socket lock, or by atomic operations. Opinions?
number of sockets. I don't want to maintain file structures associated
with all these sockets unless I absolutely must -- they're wasteful, and
kernel memory is at a premium.
The problem is that some of the code in the socket layer assumes that if
SS_NOFDREF is set, a socket's not long for this world and can be killed
off. This seems like a poor substitute for a real reference counter, and
mingles the semantics "has no associated file descriptor" and "is being
deallocated" besides.
I'd like to add reference counts to sockets, either manipulated under
the socket lock, or by atomic operations. Opinions?
--
Thor Lancelot Simon ***@rek.tjls.com
"Even experienced UNIX users occasionally enter rm *.* at the UNIX
prompt only to realize too late that they have removed the wrong
segment of the directory structure." - Microsoft WSS whitepaper
--
Posted automagically by a mail2news gateway at muc.de e.V.
Please direct questions, flames, donations, etc. to news-***@muc.de
Thor Lancelot Simon ***@rek.tjls.com
"Even experienced UNIX users occasionally enter rm *.* at the UNIX
prompt only to realize too late that they have removed the wrong
segment of the directory structure." - Microsoft WSS whitepaper
--
Posted automagically by a mail2news gateway at muc.de e.V.
Please direct questions, flames, donations, etc. to news-***@muc.de