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: 10846085 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id EC93E1515 for ; Sun, 10 Mar 2019 02:32:05 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C7B8728F2A for ; Sun, 10 Mar 2019 02:32:05 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B5FEF28F2D; Sun, 10 Mar 2019 02:32:05 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4FDE928F2A for ; Sun, 10 Mar 2019 02:32:05 +0000 (UTC) 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 X-Virus-Scanned: ClamAV using ClamSMTP 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