Repository: trafficserver Updated Branches: refs/heads/master b8a647dc3 -> 639329e38
TS-2428 Move P_Freer.h continuations to run on ET_TASK (if available). Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/639329e3 Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/639329e3 Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/639329e3 Branch: refs/heads/master Commit: 639329e38a1d4799e7bdb102a60e55f3fbf5d926 Parents: b8a647d Author: Leif Hedstrom <[email protected]> Authored: Fri May 23 18:35:30 2014 -0600 Committer: Leif Hedstrom <[email protected]> Committed: Fri May 23 18:36:17 2014 -0600 ---------------------------------------------------------------------- CHANGES | 6 ++++-- doc/reference/configuration/records.config.en.rst | 12 +++++++----- iocore/eventsystem/P_Freer.h | 14 +++++++++----- iocore/eventsystem/Tasks.cc | 3 +++ 4 files changed, 23 insertions(+), 12 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/trafficserver/blob/639329e3/CHANGES ---------------------------------------------------------------------- diff --git a/CHANGES b/CHANGES index eb9f0a7..e50acad 100644 --- a/CHANGES +++ b/CHANGES @@ -1,10 +1,12 @@ -*- coding: utf-8 -*- Changes with Apache Traffic Server 5.0.0 + *) [TS-2428] Move P_Freer.h continuations to run on ET_TASK (if available). + *) [TS-2344] 404 error was logged while url redirect request was processed - corrctly + correctly. - *) [TS-2753] Add more SPDY and HTTPS statistics + *) [TS-2753] Add more SPDY and HTTPS statistics. *) [TS-2677] Don't apply path / scheme URL changes in remap when method is CONNECT. http://git-wip-us.apache.org/repos/asf/trafficserver/blob/639329e3/doc/reference/configuration/records.config.en.rst ---------------------------------------------------------------------- diff --git a/doc/reference/configuration/records.config.en.rst b/doc/reference/configuration/records.config.en.rst index 2777812..df8dcd4 100644 --- a/doc/reference/configuration/records.config.en.rst +++ b/doc/reference/configuration/records.config.en.rst @@ -2404,12 +2404,14 @@ Sockets CONFIG proxy.config.cache.threads_per_disk INT 8 -Undocumented -============ +.. ts:cv:: CONFIG proxy.config.task_threads INT 2 -These are referenced but not documented. Please contribute a definition. + Specifies the number of task threads to run. These threads are used for + various tasks that should be off-loaded from the normal network threads. -.. ts:cv:: CONFIG proxy.config.task_threads INT 0 - .. ts:cv:: CONFIG proxy.config.http.enabled INT 1 + + Turn on or off support for HTTP proxying. This is rarely used, the one + exception being if you run Traffic Server with a protocol plugin, and would + like for it to not support HTTP requests at all. http://git-wip-us.apache.org/repos/asf/trafficserver/blob/639329e3/iocore/eventsystem/P_Freer.h ---------------------------------------------------------------------- diff --git a/iocore/eventsystem/P_Freer.h b/iocore/eventsystem/P_Freer.h index 74c52ab..391f0ec 100644 --- a/iocore/eventsystem/P_Freer.h +++ b/iocore/eventsystem/P_Freer.h @@ -24,8 +24,12 @@ #if !defined(_P_Freer_h_) #define _P_Freer_h_ - #include "libts.h" +#include "I_Tasks.h" + +// Note that these should not be used for memory that wishes to retain +// NUMA socket affinity. We'll potentially return these on an arbitarily +// selected processor/socket. template<class C> struct DeleterContinuation: public Continuation { @@ -49,7 +53,7 @@ public: // Needed by WinNT compiler (compiler bug) template<class C> TS_INLINE void new_Deleter(C * ap, ink_hrtime t) { - eventProcessor.schedule_in(new DeleterContinuation<C> (ap), t, ET_CALL); + eventProcessor.schedule_in(new DeleterContinuation<C> (ap), t, ET_TASK); } template<class C> struct FreeCallContinuation: public Continuation @@ -73,7 +77,7 @@ public: // Needed by WinNT compiler (compiler bug) template<class C> TS_INLINE void new_FreeCaller(C * ap, ink_hrtime t) { - eventProcessor.schedule_in(new FreeCallContinuation<C> (ap), t, ET_CALL); + eventProcessor.schedule_in(new FreeCallContinuation<C> (ap), t, ET_TASK); } struct FreerContinuation; @@ -101,7 +105,7 @@ struct FreerContinuation: public Continuation TS_INLINE void new_Freer(void *ap, ink_hrtime t) { - eventProcessor.schedule_in(new FreerContinuation(ap), t, ET_CALL); + eventProcessor.schedule_in(new FreerContinuation(ap), t, ET_TASK); } template<class C> struct DereferContinuation: public Continuation @@ -128,7 +132,7 @@ template<class C> struct DereferContinuation: public Continuation template<class C> TS_INLINE void new_Derefer(C * ap, ink_hrtime t) { - eventProcessor.schedule_in(new DereferContinuation<C> (ap), t, ET_CALL); + eventProcessor.schedule_in(new DereferContinuation<C> (ap), t, ET_TASK); } #endif /* _Freer_h_ */ http://git-wip-us.apache.org/repos/asf/trafficserver/blob/639329e3/iocore/eventsystem/Tasks.cc ---------------------------------------------------------------------- diff --git a/iocore/eventsystem/Tasks.cc b/iocore/eventsystem/Tasks.cc index dd27fcc..989d057 100644 --- a/iocore/eventsystem/Tasks.cc +++ b/iocore/eventsystem/Tasks.cc @@ -27,6 +27,9 @@ EventType ET_TASK = ET_CALL; TasksProcessor tasksProcessor; + +// Note that if the number of task_threads is 0, all continuations scheduled for +// ET_TASK ends up running on ET_CALL (which is the net-threads). int TasksProcessor::start(int task_threads, size_t stacksize) {
