Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752842AbdGMSlJ (ORCPT ); Thu, 13 Jul 2017 14:41:09 -0400 Received: from relay1.sgi.com ([192.48.180.66]:41806 "EHLO relay.sgi.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751375AbdGMSlH (ORCPT ); Thu, 13 Jul 2017 14:41:07 -0400 X-Greylist: delayed 461 seconds by postgrey-1.27 at vger.kernel.org; Thu, 13 Jul 2017 14:41:07 EDT From: Justin Ernst To: mingo@redhat.com Cc: abanman@hpe.com, tglx@linutronix.de, hpa@zytor.com, x86@kernel.org, mike.travis@hpe.com, sivanich@hpe.com, linux-kernel@vger.kernel.org, Justin Ernst Subject: [PATCH] x86/platform/uv/BAU: Fix congested_response_us not taking effect Date: Thu, 13 Jul 2017 13:33:23 -0500 Message-Id: <1499970803-282432-1-git-send-email-justin.ernst@hpe.com> X-Mailer: git-send-email 1.8.5.6 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1682 Lines: 47 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 Acked-by: Andrew Banman --- 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