You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by jp...@apache.org on 2013/08/20 21:26:18 UTC
[1/4] git commit: ci: update redhat package list
Updated Branches:
refs/heads/master 9d7e82121 -> 8064935bb
ci: update redhat package list
Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo
Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/8a0557fd
Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/8a0557fd
Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/8a0557fd
Branch: refs/heads/master
Commit: 8a0557fd88bdeadefa2b822f0c47b5739db0c95d
Parents: 9d7e821
Author: James Peach <jp...@apache.org>
Authored: Tue Aug 20 11:46:04 2013 -0700
Committer: James Peach <jp...@apache.org>
Committed: Tue Aug 20 11:46:04 2013 -0700
----------------------------------------------------------------------
contrib/manifests/redhat.pp | 5 +++++
1 file changed, 5 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/8a0557fd/contrib/manifests/redhat.pp
----------------------------------------------------------------------
diff --git a/contrib/manifests/redhat.pp b/contrib/manifests/redhat.pp
index 42d7188..f1c1bfd 100644
--- a/contrib/manifests/redhat.pp
+++ b/contrib/manifests/redhat.pp
@@ -14,6 +14,11 @@
# See the License for the specific language governing permissions and
# limitations under the License.
+# These packages really need to be installed before anything happens.
+package {['nfs-utils', 'redhat-lsb-core']:
+ ensure =>latest
+}
+
$source = $lsbmajdistrelease ? {
'5' => 'http://mirror.pnl.gov/epel/5/i386/epel-release-5-4.noarch.rpm',
'6' => 'http://mirror.pnl.gov/epel/6/i386/epel-release-6-8.noarch.rpm',
Re: [4/4] git commit: remove global variable dependencies from
adjust_num_of_net_threads()
Posted by James Peach <jp...@apache.org>.
On Aug 20, 2013, at 12:51 PM, Igor Galić <i....@brainsware.org> wrote:
[snip]
>>
>> - if (is_debug_tag_set("threads")) {
>> - fprintf(stderr, "# net threads Auto config - enabled\n");
>> - fprintf(stderr, "# autoconfig scale: %f\n", autoconfig_scale);
>> - fprintf(stderr, "# scaled number of net threads: %d\n",
>> num_of_threads_tmp);
>
> in digging through logging code of the plugins code I've sometimes
> seen sometimes seen fprintf(stderr,
> but I perfectly ignorant of its existence in our core code..
>
> Could someone explain what this does? (it prints stuff to the redirected
> stderr, yes, but) Why it's there?
> Why we have 3+ different ways of logging?
My guess is that at some point this code was executed before logging was initialized.
J
Re: [4/4] git commit: remove global variable dependencies from
adjust_num_of_net_threads()
Posted by Igor Galić <i....@brainsware.org>.
> Branch: refs/heads/master
> Commit: 8064935bbb3ce0eef740ee06b420b4ea5eada34f
> Parents: d2e5b80
> Author: James Peach <jp...@apache.org>
> Authored: Tue Aug 20 12:26:00 2013 -0700
> Committer: James Peach <jp...@apache.org>
> Committed: Tue Aug 20 12:26:00 2013 -0700
>
> ----------------------------------------------------------------------
> proxy/Main.cc | 43 ++++++++++++++++++++++---------------------
> 1 file changed, 22 insertions(+), 21 deletions(-)
> ----------------------------------------------------------------------
>
>
> http://git-wip-us.apache.org/repos/asf/trafficserver/blob/8064935b/proxy/Main.cc
> ----------------------------------------------------------------------
> diff --git a/proxy/Main.cc b/proxy/Main.cc
> index c80081c..bd3151e 100644
> --- a/proxy/Main.cc
> +++ b/proxy/Main.cc
> @@ -1154,48 +1154,49 @@ getNumSSLThreads(void)
> return num_of_ssl_threads;
> }
>
> -static void
> -adjust_num_of_net_threads(void)
> +static int
> +adjust_num_of_net_threads(int nthreads)
> {
> float autoconfig_scale = 1.0;
> int nth_auto_config = 1;
> int num_of_threads_tmp = 1;
>
> TS_ReadConfigInteger(nth_auto_config,
> "proxy.config.exec_thread.autoconfig");
> +
> + Debug("threads", "initial number of net threads is %d", nthreads);
> + Debug("threads", "net threads auto-configuration %s", nth_auto_config ?
> "enabled" : "disabled");
> +
> if (!nth_auto_config) {
> TS_ReadConfigInteger(num_of_threads_tmp,
> "proxy.config.exec_thread.limit");
> - if (num_of_threads_tmp <= 0)
> +
> + if (num_of_threads_tmp <= 0) {
> num_of_threads_tmp = 1;
> - else if (num_of_threads_tmp > MAX_EVENT_THREADS)
> + } else if (num_of_threads_tmp > MAX_EVENT_THREADS) {
> num_of_threads_tmp = MAX_EVENT_THREADS;
> - num_of_net_threads = num_of_threads_tmp;
> - if (is_debug_tag_set("threads")) {
> - fprintf(stderr, "# net threads Auto config - disabled - use config
> file settings\n");
> }
> +
> + nthreads = num_of_threads_tmp;
> } else { /* autoconfig is enabled */
> - num_of_threads_tmp = num_of_net_threads;
> + num_of_threads_tmp = nthreads;
> TS_ReadConfigFloat(autoconfig_scale,
> "proxy.config.exec_thread.autoconfig.scale");
> num_of_threads_tmp = (int) ((float) num_of_threads_tmp *
> autoconfig_scale);
> +
> if (num_of_threads_tmp) {
> - num_of_net_threads = num_of_threads_tmp;
> + nthreads = num_of_threads_tmp;
> }
> +
> if (unlikely(num_of_threads_tmp > MAX_EVENT_THREADS)) {
> num_of_threads_tmp = MAX_EVENT_THREADS;
> }
> - if (is_debug_tag_set("threads")) {
> - fprintf(stderr, "# net threads Auto config - enabled\n");
> - fprintf(stderr, "# autoconfig scale: %f\n", autoconfig_scale);
> - fprintf(stderr, "# scaled number of net threads: %d\n",
> num_of_threads_tmp);
in digging through logging code of the plugins code I've sometimes
seen sometimes seen fprintf(stderr,
but I perfectly ignorant of its existence in our core code..
Could someone explain what this does? (it prints stuff to the redirected
stderr, yes, but) Why it's there?
Why we have 3+ different ways of logging?
-- i
Igor Galić
Tel: +43 (0) 664 886 22 883
Mail: i.galic@brainsware.org
URL: http://brainsware.org/
GPG: 6880 4155 74BD FD7C B515 2EA5 4B1D 9E08 A097 C9AE
[4/4] git commit: remove global variable dependencies from
adjust_num_of_net_threads()
Posted by jp...@apache.org.
remove global variable dependencies from adjust_num_of_net_threads()
Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo
Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/8064935b
Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/8064935b
Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/8064935b
Branch: refs/heads/master
Commit: 8064935bbb3ce0eef740ee06b420b4ea5eada34f
Parents: d2e5b80
Author: James Peach <jp...@apache.org>
Authored: Tue Aug 20 12:26:00 2013 -0700
Committer: James Peach <jp...@apache.org>
Committed: Tue Aug 20 12:26:00 2013 -0700
----------------------------------------------------------------------
proxy/Main.cc | 43 ++++++++++++++++++++++---------------------
1 file changed, 22 insertions(+), 21 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/8064935b/proxy/Main.cc
----------------------------------------------------------------------
diff --git a/proxy/Main.cc b/proxy/Main.cc
index c80081c..bd3151e 100644
--- a/proxy/Main.cc
+++ b/proxy/Main.cc
@@ -1154,48 +1154,49 @@ getNumSSLThreads(void)
return num_of_ssl_threads;
}
-static void
-adjust_num_of_net_threads(void)
+static int
+adjust_num_of_net_threads(int nthreads)
{
float autoconfig_scale = 1.0;
int nth_auto_config = 1;
int num_of_threads_tmp = 1;
TS_ReadConfigInteger(nth_auto_config, "proxy.config.exec_thread.autoconfig");
+
+ Debug("threads", "initial number of net threads is %d", nthreads);
+ Debug("threads", "net threads auto-configuration %s", nth_auto_config ? "enabled" : "disabled");
+
if (!nth_auto_config) {
TS_ReadConfigInteger(num_of_threads_tmp, "proxy.config.exec_thread.limit");
- if (num_of_threads_tmp <= 0)
+
+ if (num_of_threads_tmp <= 0) {
num_of_threads_tmp = 1;
- else if (num_of_threads_tmp > MAX_EVENT_THREADS)
+ } else if (num_of_threads_tmp > MAX_EVENT_THREADS) {
num_of_threads_tmp = MAX_EVENT_THREADS;
- num_of_net_threads = num_of_threads_tmp;
- if (is_debug_tag_set("threads")) {
- fprintf(stderr, "# net threads Auto config - disabled - use config file settings\n");
}
+
+ nthreads = num_of_threads_tmp;
} else { /* autoconfig is enabled */
- num_of_threads_tmp = num_of_net_threads;
+ num_of_threads_tmp = nthreads;
TS_ReadConfigFloat(autoconfig_scale, "proxy.config.exec_thread.autoconfig.scale");
num_of_threads_tmp = (int) ((float) num_of_threads_tmp * autoconfig_scale);
+
if (num_of_threads_tmp) {
- num_of_net_threads = num_of_threads_tmp;
+ nthreads = num_of_threads_tmp;
}
+
if (unlikely(num_of_threads_tmp > MAX_EVENT_THREADS)) {
num_of_threads_tmp = MAX_EVENT_THREADS;
}
- if (is_debug_tag_set("threads")) {
- fprintf(stderr, "# net threads Auto config - enabled\n");
- fprintf(stderr, "# autoconfig scale: %f\n", autoconfig_scale);
- fprintf(stderr, "# scaled number of net threads: %d\n", num_of_threads_tmp);
- }
}
- if (is_debug_tag_set("threads")) {
- fprintf(stderr, "# number of net threads: %d\n", num_of_net_threads);
- }
- if (unlikely(num_of_net_threads <= 0)) { /* impossible case -just for protection */
- Warning("Number of Net Threads should be greater than 0");
- num_of_net_threads = 1;
+ if (unlikely(nthreads <= 0)) { /* impossible case -just for protection */
+ Warning("number of net threads must be greater than 0, resetting to 1");
+ nthreads = 1;
}
+
+ Debug("threads", "adjusted number of net threads is %d", nthreads);
+ return nthreads;
}
/**
@@ -1496,7 +1497,7 @@ main(int /* argc ATS_UNUSED */, char **argv)
// Initialize New Stat system
initialize_all_global_stats();
- adjust_num_of_net_threads();
+ num_of_net_threads = adjust_num_of_net_threads(num_of_net_threads);
size_t stacksize;
REC_ReadConfigInteger(stacksize, "proxy.config.thread.default.stacksize");
[2/4] git commit: ci: more robust autoreconf detection
Posted by jp...@apache.org.
ci: more robust autoreconf detection
Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo
Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/eb1726dd
Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/eb1726dd
Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/eb1726dd
Branch: refs/heads/master
Commit: eb1726dd64c32b9894fa212bb2ec9d791220d2bd
Parents: 8a0557f
Author: James Peach <jp...@apache.org>
Authored: Tue Aug 20 11:47:32 2013 -0700
Committer: James Peach <jp...@apache.org>
Committed: Tue Aug 20 11:47:32 2013 -0700
----------------------------------------------------------------------
ci/regression | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/eb1726dd/ci/regression
----------------------------------------------------------------------
diff --git a/ci/regression b/ci/regression
index 3b2eca8..9303955 100755
--- a/ci/regression
+++ b/ci/regression
@@ -75,12 +75,13 @@ extras() {
}
autogen() {
- [[ -e "$SRCROOT/configure" ]] || ( cd $SRCROOT && autoreconf -fi )
+ (
+ cd "$SRCROOT"
+ [ configure -nt configure.ac -a Makefile -nt Makefile.am ] || autoreconf -fi
+ )
}
configure() {
- [[ -e "$SRCROOT/Makefile" ]] && ( cd $SRCROOT && make distclean)
-
(
cd $OBJROOT
$SRCROOT/configure \
[3/4] git commit: Remove global number_of_processors variable
Posted by jp...@apache.org.
Remove global number_of_processors variable
Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo
Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/d2e5b808
Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/d2e5b808
Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/d2e5b808
Branch: refs/heads/master
Commit: d2e5b8089b1741a173feee514e67278c1766bac3
Parents: eb1726d
Author: James Peach <jp...@apache.org>
Authored: Tue Aug 20 11:48:54 2013 -0700
Committer: James Peach <jp...@apache.org>
Committed: Tue Aug 20 11:48:54 2013 -0700
----------------------------------------------------------------------
proxy/Main.cc | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/d2e5b808/proxy/Main.cc
----------------------------------------------------------------------
diff --git a/proxy/Main.cc b/proxy/Main.cc
index be52f0a..c80081c 100644
--- a/proxy/Main.cc
+++ b/proxy/Main.cc
@@ -120,8 +120,7 @@ static void * mgmt_restart_shutdown_callback(void *, char *, int data_len);
static int version_flag = DEFAULT_VERSION_FLAG;
-static int const number_of_processors = ink_number_of_processors();
-static int num_of_net_threads = number_of_processors;
+static int num_of_net_threads = ink_number_of_processors();
static int num_of_udp_threads = 0;
static int num_accept_threads = 0;
static int num_task_threads = 0;
@@ -1143,9 +1142,8 @@ getNumSSLThreads(void)
} else {
float autoconfig_scale = 1.5;
- ink_assert(number_of_processors);
TS_ReadConfigFloat(autoconfig_scale, "proxy.config.exec_thread.autoconfig.scale");
- num_of_ssl_threads = (int)((float)number_of_processors * autoconfig_scale);
+ num_of_ssl_threads = (int)((float)ink_number_of_processors() * autoconfig_scale);
// Last resort
if (num_of_ssl_threads <= 0)