httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s.@apache.org
Subject svn commit: r954213 - /httpd/httpd/trunk/modules/metadata/mod_unique_id.c
Date Sun, 13 Jun 2010 12:44:51 GMT
Author: sf
Date: Sun Jun 13 12:44:51 2010
New Revision: 954213

URL: http://svn.apache.org/viewvc?rev=954213&view=rev
Log:
Add comment that using cur_unique_id.counter from all threads is bad for
performance on SMP systems.

Modified:
    httpd/httpd/trunk/modules/metadata/mod_unique_id.c

Modified: httpd/httpd/trunk/modules/metadata/mod_unique_id.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/metadata/mod_unique_id.c?rev=954213&r1=954212&r2=954213&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/metadata/mod_unique_id.c (original)
+++ httpd/httpd/trunk/modules/metadata/mod_unique_id.c Sun Jun 13 12:44:51 2010
@@ -118,6 +118,12 @@ typedef struct {
 
 static unsigned global_in_addr;
 
+/*
+ * XXX: We should have a per-thread counter and not use cur_unique_id.counter
+ * XXX: in all threads, because this is bad for performance on multi-processor
+ * XXX: systems: Writing to the same address from several CPUs causes cache
+ * XXX: thrashing.
+ */
 static unique_id_rec cur_unique_id;
 
 /*



Mime
View raw message