You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by sf...@apache.org on 2010/06/13 14:44:51 UTC

svn commit: r954213 - /httpd/httpd/trunk/modules/metadata/mod_unique_id.c

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;
 
 /*