]> granicus.if.org Git - apache/commitdiff
Add comment that using cur_unique_id.counter from all threads is bad for
authorStefan Fritsch <sf@apache.org>
Sun, 13 Jun 2010 12:44:51 +0000 (12:44 +0000)
committerStefan Fritsch <sf@apache.org>
Sun, 13 Jun 2010 12:44:51 +0000 (12:44 +0000)
performance on SMP systems.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@954213 13f79535-47bb-0310-9956-ffa450edef68

modules/metadata/mod_unique_id.c

index f828fb348c7d06c09e8c4ad6b9debe55a3b13bb5..fe4252b48e0168cdad651158615d343ed379d703 100644 (file)
@@ -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;
 
 /*