From patchwork Sun Mar 10 02:31:51 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steve French X-Patchwork-Id: 1053904 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=vger.kernel.org (client-ip=209.132.180.67; helo=vger.kernel.org; envelope-from=linux-cifs-owner@vger.kernel.org; receiver=) Authentication-Results: ozlabs.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="NDMqvD3S"; dkim-atps=neutral Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 44H4xz20Drz9s4Y for ; Sun, 10 Mar 2019 13:32:06 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726703AbfCJCcE (ORCPT ); Sat, 9 Mar 2019 21:32:04 -0500 Received: from mail-pg1-f181.google.com ([209.85.215.181]:34226 "EHLO mail-pg1-f181.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726699AbfCJCcE (ORCPT ); Sat, 9 Mar 2019 21:32:04 -0500 Received: by mail-pg1-f181.google.com with SMTP id u65so1274798pgc.1 for ; Sat, 09 Mar 2019 18:32:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to:cc; bh=5kg9+rzmwy5Gcm8b9W/KQDkvLCJIlcU3ZQEplFCcKJk=; b=NDMqvD3S24mFE4LCyiHeSCBtgwpnRpTLfansW4Rp9gC9pWwyHqvGtZqZq5+lAM15P6 ZpiqpnFXCO0DhWy0b6ZdEBDxd4Q/lFAPr8MVNBD/O40PaCxEiOFNW/PO1TKHxMhQuu8o J8JVKw3wtiWaFoPZQg5ESe/MBBxYcoSC8EPh5YCMun314eny6uqKyBOgclhUbyyivaXt ATz3KvZ1AIQRwTFp9/K6HHUbzkUtxHhDn59GauUqMUB+Ypj5NWYtGy8aYBh2Tzp8R0Gy LnM7mwtiTUl8HVjA0HUSHHWQiWDPoAXv78+AUFDEWDFPamhHkCuCQ81kmn9FYS3EvS5v 7TYg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to:cc; bh=5kg9+rzmwy5Gcm8b9W/KQDkvLCJIlcU3ZQEplFCcKJk=; b=n0NeEt6SEBnbSvbZQgI+E6hFZ33bdnI5IQVXFx32UEGwQDmIAwwl117lx9fv1gt6sZ njRYV2NFa8zGSIEXceWF9dnN2jaeTaKwRHojPdhyQCJe3KyZQNxCY7u2602BcYS4Nldy oFWIM7eGILNwdZEghckpoTkN69iiUi1K197rvpJixuqm1pEG1xbv3YjbgiRl28sIC6Qn BenrykTZFAjRNozDYaexrJphHVA/3Vk23WJWguIMxAGjqoeEoGRXndJ9UmduvMt/S/g4 yATUo46BJAT3u5DgPuMury7skoFEuxOZjer0tZNrkTrijbx5l+BvaJ28GDJWI2qrKHFa 8Uhw== X-Gm-Message-State: APjAAAWUNuaAErGmqR4TbacQmG1XDowevFIkorS+tKxLQdgqPmXAT1Ka w7f1lz+GPg/6mEIeqLzn/aoofpDc878oTisf2p+27A== X-Google-Smtp-Source: APXvYqzKuEPoc91QCEcoI60zYxeRWnIf0k7/bR6j6Dm82X5JKoi7RwM01S/PkgzSftlmSSqiu6aV8xlNFZam5olk2EY= X-Received: by 2002:a62:b2d9:: with SMTP id z86mr26514981pfl.255.1552185123087; Sat, 09 Mar 2019 18:32:03 -0800 (PST) MIME-Version: 1.0 From: Steve French Date: Sat, 9 Mar 2019 20:31:51 -0600 Message-ID: Subject: [PATCH] Add dynamic trace point for timeouts waiting for credits To: CIFS Cc: Pavel Shilovsky , ronnie sahlberg Sender: linux-cifs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-cifs@vger.kernel.org Reviewed-by: Pavel Shilovsky From 0551fe7c680f5a3bb33a5c28d8f713dd562462b9 Mon Sep 17 00:00:00 2001 From: Steve French Date: Sat, 9 Mar 2019 20:29:55 -0600 Subject: [PATCH] smb3: add dynamic tracepoint for timeout waiting for credits To help debug credit starvation problems where we timeout waiting for server to grant the client credits. Signed-off-by: Steve French --- fs/cifs/trace.h | 1 + fs/cifs/transport.c | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/fs/cifs/trace.h b/fs/cifs/trace.h index d8b049afa606..c78e96c4cc53 100644 --- a/fs/cifs/trace.h +++ b/fs/cifs/trace.h @@ -713,6 +713,7 @@ DEFINE_EVENT(smb3_credit_class, smb3_##name, \ TP_ARGS(currmid, hostname, credits)) DEFINE_SMB3_CREDIT_EVENT(reconnect_with_invalid_credits); +DEFINE_SMB3_CREDIT_EVENT(credit_timeout); #endif /* _CIFS_TRACE_H */ diff --git a/fs/cifs/transport.c b/fs/cifs/transport.c index b3d04018195c..8731cfa66026 100644 --- a/fs/cifs/transport.c +++ b/fs/cifs/transport.c @@ -527,6 +527,8 @@ wait_for_free_credits(struct TCP_Server_Info *server, const int num_credits, has_credits(server, credits, num_credits), t); cifs_num_waiters_dec(server); if (!rc) { + trace_smb3_credit_timeout(server->CurrentMid, + server->hostname, num_credits); cifs_dbg(VFS, "wait timed out after %d ms\n", timeout); return -ENOTSUPP; @@ -565,6 +567,9 @@ wait_for_free_credits(struct TCP_Server_Info *server, const int num_credits, t); cifs_num_waiters_dec(server); if (!rc) { + trace_smb3_credit_timeout( + server->CurrentMid, + server->hostname, num_credits); cifs_dbg(VFS, "wait timed out after %d ms\n", timeout); return -ENOTSUPP; -- 2.17.1