Another solution to reduce locking, just to allocate maxconn structures
with its own mutex and perform locking for particular struct only, so
writers will not block other writers, only writer/reader. More memory
but less concurrency.
I will try this tomorrow.
Zoran Vasiljevic wrote:
Am 31.12.2005 um 18:20 schrieb Vlad Seryakov:
Another possible solution can be, pre-allocating maxconn upload
structs and update them without locks, it is integer anyway, so no
need to lock, 4 byte write is never innterupted, usually it is 1 CPU
instruction(true for Intel, maybe not for Sparc).
Nope. Need locking even for integers. I've seen crazy things...
OTOH, I'm not that concerned about the locking if it is short-lived
and not frequently done. I believe the "not frequently done" is the
hardest thing to judge.
Zoran
-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log
files
for problems? Stop! Download the new AJAX search engine that makes
searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
_______________________________________________
naviserver-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/naviserver-devel
--
Vlad Seryakov
571 262-8608 office
[EMAIL PROTECTED]
http://www.crystalballinc.com/vlad/