You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by bc...@apache.org on 2013/03/12 19:13:22 UTC

git commit: reverted checkin for TS-1744 - ats run with 1 less event thread then it is supposed to, for both auto and manual thread config

Updated Branches:
  refs/heads/master 5bcc19e6e -> 34b8adc6b


reverted checkin for TS-1744 - ats run with 1 less event thread then it is
supposed to, for both auto and manual thread config


Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo
Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/34b8adc6
Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/34b8adc6
Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/34b8adc6

Branch: refs/heads/master
Commit: 34b8adc6b670a9a7c5425c75230d112cbcd85022
Parents: 5bcc19e
Author: Bryan Call <bc...@apache.org>
Authored: Tue Mar 12 11:01:58 2013 -0700
Committer: Bryan Call <bc...@apache.org>
Committed: Tue Mar 12 11:01:58 2013 -0700

----------------------------------------------------------------------
 CHANGES                                  |    3 ---
 iocore/eventsystem/UnixEventProcessor.cc |    6 +++---
 2 files changed, 3 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/trafficserver/blob/34b8adc6/CHANGES
----------------------------------------------------------------------
diff --git a/CHANGES b/CHANGES
index 1929eee..31e4062 100644
--- a/CHANGES
+++ b/CHANGES
@@ -6,9 +6,6 @@
 
   *) [TS-1742] Freelists to use 64bit version w/ Double Word Compare and Swap
 
-  *) [TS-1744] ats run with 1 less event thread then it is supposed to, for
-  both auto and manual thread config
-
   *) [TS-1356] Ability to set thread affinity with multiple modes
 
   

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/34b8adc6/iocore/eventsystem/UnixEventProcessor.cc
----------------------------------------------------------------------
diff --git a/iocore/eventsystem/UnixEventProcessor.cc b/iocore/eventsystem/UnixEventProcessor.cc
index 5a15ea5..1efdf0b 100644
--- a/iocore/eventsystem/UnixEventProcessor.cc
+++ b/iocore/eventsystem/UnixEventProcessor.cc
@@ -174,8 +174,8 @@ EventProcessor::start(int n_event_threads)
   Debug("iocore_thread", "socket: %d core: %d logical processor: %d affinity: %d", socket, cu, pu, affinity);
 #endif
 
-  for (i = 0; i < n_ethreads; i++) {
-    snprintf(thr_name, MAX_THREAD_NAME_LENGTH, "[ET_NET %d]", i + 1);
+  for (i = first_thread; i < n_ethreads; i++) {
+    snprintf(thr_name, MAX_THREAD_NAME_LENGTH, "[ET_NET %d]", i);
     ink_thread tid = all_ethreads[i]->start(thr_name);
     (void)tid;
 
@@ -197,7 +197,7 @@ EventProcessor::start(int n_event_threads)
       char debug_message[256];
       int len = snprintf(debug_message, sizeof(debug_message), "setaffinity tid: %" PTR_FMT ", net thread: %u cpu:", tid, i);
       for (int cpu_count = 0; cpu_count < logical_ratio; cpu_count++) {
-        int cpu = (i * logical_ratio + cpu_count) % pu;
+        int cpu = ((i - 1) * logical_ratio + cpu_count) % pu;
         set_cpu(&cpuset, cpu);
         len += snprintf(debug_message + len, sizeof(debug_message) - len, " %d", cpu);
       }