public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] x86/platform/uv/BAU: Fix congested_response_us not taking effect
@ 2017-07-13 18:33 Justin Ernst
  2017-07-14  9:09 ` [tip:x86/urgent] " tip-bot for Justin Ernst
  2017-07-16  9:14 ` tip-bot for Justin Ernst
  0 siblings, 2 replies; 3+ messages in thread
From: Justin Ernst @ 2017-07-13 18:33 UTC (permalink / raw)
  To: mingo
  Cc: abanman, tglx, hpa, x86, mike.travis, sivanich, linux-kernel,
	Justin Ernst

Bug fix for the BAU tunable congested_cycles not being set to the user
defined value. Instead of referencing a global variable when deciding
on BAU shutdown, a node will reference its own tunable set
value ( cong_response_us). This results in the user set
tunable value congested_response_us taking effect correctly.

Signed-off-by: Justin Ernst <justin.ernst@hpe.com>
Acked-by: Andrew Banman <abanman@hpe.com>
---
 arch/x86/platform/uv/tlb_uv.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/arch/x86/platform/uv/tlb_uv.c b/arch/x86/platform/uv/tlb_uv.c
index 2983faa..8ce4657 100644
--- a/arch/x86/platform/uv/tlb_uv.c
+++ b/arch/x86/platform/uv/tlb_uv.c
@@ -40,7 +40,6 @@
 static int timeout_us;
 static bool nobau = true;
 static int nobau_perm;
-static cycles_t congested_cycles;
 
 /* tunables: */
 static int max_concurr		= MAX_BAU_CONCURRENT;
@@ -849,10 +848,10 @@ static void record_send_stats(cycles_t time1, cycles_t time2,
 		if ((completion_status == FLUSH_COMPLETE) && (try == 1)) {
 			bcp->period_requests++;
 			bcp->period_time += elapsed;
-			if ((elapsed > congested_cycles) &&
+			if ((elapsed > usec_2_cycles(bcp->cong_response_us)) &&
 			    (bcp->period_requests > bcp->cong_reps) &&
 			    ((bcp->period_time / bcp->period_requests) >
-							congested_cycles)) {
+					usec_2_cycles(bcp->cong_response_us))) {
 				stat->s_congested++;
 				disable_for_period(bcp, stat);
 			}
@@ -2247,7 +2246,6 @@ static int __init uv_bau_init(void)
 	}
 
 	nuvhubs = uv_num_possible_blades();
-	congested_cycles = usec_2_cycles(congested_respns_us);
 
 	uv_base_pnode = 0x7fffffff;
 	for (uvhub = 0; uvhub < nuvhubs; uvhub++) {
-- 
1.8.5.6

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [tip:x86/urgent] x86/platform/uv/BAU: Fix congested_response_us not taking effect
  2017-07-13 18:33 [PATCH] x86/platform/uv/BAU: Fix congested_response_us not taking effect Justin Ernst
@ 2017-07-14  9:09 ` tip-bot for Justin Ernst
  2017-07-16  9:14 ` tip-bot for Justin Ernst
  1 sibling, 0 replies; 3+ messages in thread
From: tip-bot for Justin Ernst @ 2017-07-14  9:09 UTC (permalink / raw)
  To: linux-tip-commits
  Cc: abanman, mingo, tglx, hpa, torvalds, linux-kernel, peterz,
	justin.ernst

Commit-ID:  91b2082ee3382fd58b605f1c75c88dff2fd5769b
Gitweb:     http://git.kernel.org/tip/91b2082ee3382fd58b605f1c75c88dff2fd5769b
Author:     Justin Ernst <justin.ernst@hpe.com>
AuthorDate: Thu, 13 Jul 2017 13:33:23 -0500
Committer:  Ingo Molnar <mingo@kernel.org>
CommitDate: Fri, 14 Jul 2017 10:23:04 +0200

x86/platform/uv/BAU: Fix congested_response_us not taking effect

Bug fix for the BAU tunable congested_cycles not being set to the user
defined value. Instead of referencing a global variable when deciding
on BAU shutdown, a node will reference its own tunable set
value ( cong_response_us). This results in the user set
tunable value congested_response_us taking effect correctly.

Signed-off-by: Justin Ernst <justin.ernst@hpe.com>
Acked-by: Andrew Banman <abanman@hpe.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: mike.travis@hpe.com
Cc: sivanich@hpe.com
Link: http://lkml.kernel.org/r/1499970803-282432-1-git-send-email-justin.ernst@hpe.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
---
 arch/x86/platform/uv/tlb_uv.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/arch/x86/platform/uv/tlb_uv.c b/arch/x86/platform/uv/tlb_uv.c
index d4a61dd..fd87591 100644
--- a/arch/x86/platform/uv/tlb_uv.c
+++ b/arch/x86/platform/uv/tlb_uv.c
@@ -40,7 +40,6 @@ static int timeout_base_ns[] = {
 static int timeout_us;
 static bool nobau = true;
 static int nobau_perm;
-static cycles_t congested_cycles;
 
 /* tunables: */
 static int max_concurr		= MAX_BAU_CONCURRENT;
@@ -829,10 +828,10 @@ static void record_send_stats(cycles_t time1, cycles_t time2,
 		if ((completion_status == FLUSH_COMPLETE) && (try == 1)) {
 			bcp->period_requests++;
 			bcp->period_time += elapsed;
-			if ((elapsed > congested_cycles) &&
+			if ((elapsed > usec_2_cycles(bcp->cong_response_us)) &&
 			    (bcp->period_requests > bcp->cong_reps) &&
 			    ((bcp->period_time / bcp->period_requests) >
-							congested_cycles)) {
+					usec_2_cycles(bcp->cong_response_us))) {
 				stat->s_congested++;
 				disable_for_period(bcp, stat);
 			}
@@ -2228,7 +2227,6 @@ static int __init uv_bau_init(void)
 	}
 
 	nuvhubs = uv_num_possible_blades();
-	congested_cycles = usec_2_cycles(congested_respns_us);
 
 	uv_base_pnode = 0x7fffffff;
 	for (uvhub = 0; uvhub < nuvhubs; uvhub++) {

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [tip:x86/urgent] x86/platform/uv/BAU: Fix congested_response_us not taking effect
  2017-07-13 18:33 [PATCH] x86/platform/uv/BAU: Fix congested_response_us not taking effect Justin Ernst
  2017-07-14  9:09 ` [tip:x86/urgent] " tip-bot for Justin Ernst
@ 2017-07-16  9:14 ` tip-bot for Justin Ernst
  1 sibling, 0 replies; 3+ messages in thread
From: tip-bot for Justin Ernst @ 2017-07-16  9:14 UTC (permalink / raw)
  To: linux-tip-commits
  Cc: linux-kernel, torvalds, peterz, justin.ernst, tglx, hpa, abanman,
	mingo

Commit-ID:  dfc1ed1caef09e6be147f9e8d72631e788ffefd9
Gitweb:     http://git.kernel.org/tip/dfc1ed1caef09e6be147f9e8d72631e788ffefd9
Author:     Justin Ernst <justin.ernst@hpe.com>
AuthorDate: Thu, 13 Jul 2017 13:33:23 -0500
Committer:  Ingo Molnar <mingo@kernel.org>
CommitDate: Sun, 16 Jul 2017 11:05:04 +0200

x86/platform/uv/BAU: Fix congested_response_us not taking effect

Bug fix for the BAU tunable congested_cycles not being set to the user
defined value. Instead of referencing a global variable when deciding
on BAU shutdown, a node will reference its own tunable set
value ( cong_response_us). This results in the user set
tunable value congested_response_us taking effect correctly.

Signed-off-by: Justin Ernst <justin.ernst@hpe.com>
Acked-by: Andrew Banman <abanman@hpe.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: mike.travis@hpe.com
Cc: sivanich@hpe.com
Link: http://lkml.kernel.org/r/1499970803-282432-1-git-send-email-justin.ernst@hpe.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
---
 arch/x86/platform/uv/tlb_uv.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/arch/x86/platform/uv/tlb_uv.c b/arch/x86/platform/uv/tlb_uv.c
index d4a61dd..fd87591 100644
--- a/arch/x86/platform/uv/tlb_uv.c
+++ b/arch/x86/platform/uv/tlb_uv.c
@@ -40,7 +40,6 @@ static int timeout_base_ns[] = {
 static int timeout_us;
 static bool nobau = true;
 static int nobau_perm;
-static cycles_t congested_cycles;
 
 /* tunables: */
 static int max_concurr		= MAX_BAU_CONCURRENT;
@@ -829,10 +828,10 @@ static void record_send_stats(cycles_t time1, cycles_t time2,
 		if ((completion_status == FLUSH_COMPLETE) && (try == 1)) {
 			bcp->period_requests++;
 			bcp->period_time += elapsed;
-			if ((elapsed > congested_cycles) &&
+			if ((elapsed > usec_2_cycles(bcp->cong_response_us)) &&
 			    (bcp->period_requests > bcp->cong_reps) &&
 			    ((bcp->period_time / bcp->period_requests) >
-							congested_cycles)) {
+					usec_2_cycles(bcp->cong_response_us))) {
 				stat->s_congested++;
 				disable_for_period(bcp, stat);
 			}
@@ -2228,7 +2227,6 @@ static int __init uv_bau_init(void)
 	}
 
 	nuvhubs = uv_num_possible_blades();
-	congested_cycles = usec_2_cycles(congested_respns_us);
 
 	uv_base_pnode = 0x7fffffff;
 	for (uvhub = 0; uvhub < nuvhubs; uvhub++) {

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2017-07-16  9:19 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-07-13 18:33 [PATCH] x86/platform/uv/BAU: Fix congested_response_us not taking effect Justin Ernst
2017-07-14  9:09 ` [tip:x86/urgent] " tip-bot for Justin Ernst
2017-07-16  9:14 ` tip-bot for Justin Ernst

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox