Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751237AbdGPJTT (ORCPT ); Sun, 16 Jul 2017 05:19:19 -0400 Received: from terminus.zytor.com ([65.50.211.136]:42257 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751048AbdGPJTR (ORCPT ); Sun, 16 Jul 2017 05:19:17 -0400 Date: Sun, 16 Jul 2017 02:14:46 -0700 From: tip-bot for Justin Ernst Message-ID: Cc: linux-kernel@vger.kernel.org, torvalds@linux-foundation.org, peterz@infradead.org, justin.ernst@hpe.com, tglx@linutronix.de, hpa@zytor.com, abanman@hpe.com, mingo@kernel.org Reply-To: peterz@infradead.org, abanman@hpe.com, mingo@kernel.org, hpa@zytor.com, tglx@linutronix.de, justin.ernst@hpe.com, torvalds@linux-foundation.org, linux-kernel@vger.kernel.org In-Reply-To: <1499970803-282432-1-git-send-email-justin.ernst@hpe.com> References: <1499970803-282432-1-git-send-email-justin.ernst@hpe.com> To: linux-tip-commits@vger.kernel.org Subject: [tip:x86/urgent] x86/platform/uv/BAU: Fix congested_response_us not taking effect Git-Commit-ID: dfc1ed1caef09e6be147f9e8d72631e788ffefd9 X-Mailer: tip-git-log-daemon Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 Content-Disposition: inline Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2393 Lines: 61 Commit-ID: dfc1ed1caef09e6be147f9e8d72631e788ffefd9 Gitweb: http://git.kernel.org/tip/dfc1ed1caef09e6be147f9e8d72631e788ffefd9 Author: Justin Ernst AuthorDate: Thu, 13 Jul 2017 13:33:23 -0500 Committer: Ingo Molnar 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 Acked-by: Andrew Banman Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner 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 --- 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++) {