Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp6143125imm; Sat, 19 May 2018 18:57:31 -0700 (PDT) X-Google-Smtp-Source: AB8JxZpPoRSlWPWI8qFBRqfxisy+3PnkPXHuXhe1IACWXEoshO50u4CrvecW4m9eTTplm489aFwj X-Received: by 2002:a17:902:42c3:: with SMTP id h61-v6mr15278557pld.164.1526781451047; Sat, 19 May 2018 18:57:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1526781451; cv=none; d=google.com; s=arc-20160816; b=0rWajLMnNXXHkYUTFtvahk8Ix9OnUnWj8FtLZJ61LSP9gj2+0Hp+WXvnzPg7Shc0vj 213zhpzhEBdBv668QLS5rsZDfH6XK2Ry37aiqIhoPOlzo9OTg1EPS6PywxrKtpNwQaoL 2hCYAhR/sJ8RKXFeE8828C2Sikz+bWDxJaW56HZy4yTg6qQdNwbD3/j3baCGGEcRGc6D gFXDXWU/4sHBwUqfRctFagLrhP3g1odqbKb1z1SMnEHh81oWeCfcYbDUsG6hl1Z2lpDA YbocFCltTVnb/MjSb376zvwvI4PfBFL2s5aqCzsk769cp1Ae0kKluC9Nf9gM2bfkRlb4 1ylA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:cc:to:subject :message-id:date:from:references:in-reply-to:mime-version :dkim-signature:arc-authentication-results; bh=+043WoA2zGewz0nLWG1J2ehsGsx2fVZ6NcZUbEa9p+E=; b=BR06qU29hGp1GJ1eh8lNu/uf2LMvFpUJcU1N1/kb6/2cScF1lJu7BnKSXd9WioP+YU gSVagGcDEpvSfGbH3NZIPl8j2gB1L56A3B56Kgt4QDgEVDzObLsaiBrft9v4InCgSo9L BJJz4EfjuG/jaAuY9jrSIhvxgPoo9U9xJcC+3YWMWfc5j5JZQiVXSlfbCQOoraYEUVZJ CdMgHLZ3PvjbJq4InsTLHtx9F1Ojxz07rb+QkYUNU5e0x8tuxqwYM1NaGzaJ1Fjnnymr +zjZsq5EcCp/Zh7C6jZ9RGWQywh9AdyzhHROUUtbNukG68KAl205fNmnrRFDkdrdGJ/W EAvg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=oU/xX8Hv; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z26-v6si10813255pfd.26.2018.05.19.18.57.15; Sat, 19 May 2018 18:57:31 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=oU/xX8Hv; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752523AbeETB5C (ORCPT + 99 others); Sat, 19 May 2018 21:57:02 -0400 Received: from mail-pf0-f196.google.com ([209.85.192.196]:37568 "EHLO mail-pf0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752188AbeETB5B (ORCPT ); Sat, 19 May 2018 21:57:01 -0400 Received: by mail-pf0-f196.google.com with SMTP id e9-v6so5446208pfi.4; Sat, 19 May 2018 18:57:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=+043WoA2zGewz0nLWG1J2ehsGsx2fVZ6NcZUbEa9p+E=; b=oU/xX8HvB37lOMCu2GT1rHp4flk1XykG1l9HFA0R893C8lQ0UXAcAyK4MfFM+4dSfB lhorKF4wpIfjNZeYLG/SJyp19uHorelUnwuUNU0AQzo8voQAVEOrTirZZkW1McJBYLSt EO16R/FKXqK9wKgsYHD9IbtxQ5J3jOQjfffctOH+fHK2J+/C+QuMDyNoszMnV1Ncn/kq z/hkonufOCnDkHKZJNYjFygF0v9M74HZ2pCVerPeiUwuTT50oLtuDaCxZI5HdHfMxu2f knl+Ie8BruOBchA4ru0Q31O8/vEGHZUnY90FJVbmJGaD5Me0qwjMjIqeaZsHdGpGLcVh lgqg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=+043WoA2zGewz0nLWG1J2ehsGsx2fVZ6NcZUbEa9p+E=; b=uI5BLq7Exi+J/6FBHVzoI1XWIMr9crdfL3pzmg+KNPPFYShlY3zHUsl81+XyG8Ze37 CjxOzTt5fyyF8yGGIX1vSnEgoXRbFy/wzC3/UPwciRfKlavHShcfHWdp86fvm4x2yTlj qKKtr9mInJUAkK6+rx7tIQ1stpLaLB+dNPHciv7MkBh2uJG0PbIgDdh+d386NAJrIWlD Mt447n168w0k0EM9mgOd73P4ay1SRQ4o+3ScQPZbK+yBgRX9aLv9thsfeNi9oUh2vG4n XOlPFzCcJQydMTKSO8V44EshzfC7PpDiK9AazZ1ahxfK0clLAaU9rXgI4lpnJAsonaw4 DOdA== X-Gm-Message-State: ALKqPweFUi/0VPAvMyGn99lOFnSCaDalHzkn+zZ2QZD3lT4luTfKSxt8 +kOtEvxhcb8RtQwDyMUawUxK1hDeGQU26f0Mtf4R5w== X-Received: by 2002:a63:721e:: with SMTP id n30-v6mr2704653pgc.30.1526781420228; Sat, 19 May 2018 18:57:00 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a17:90a:bd8f:0:0:0:0 with HTTP; Sat, 19 May 2018 18:56:39 -0700 (PDT) In-Reply-To: <20180519232257.GL10363@dastard> References: <20180518184630.axfa7oq4pewb7foj@kazak> <20180519232257.GL10363@dastard> From: Steve French Date: Sat, 19 May 2018 20:56:39 -0500 Message-ID: Subject: Re: [PATCHv2][SMB3] Add kernel trace support To: Dave Chinner Cc: =?UTF-8?B?UmFscGggQsO2aG1l?= , CIFS , LKML , samba-technical , linux-fsdevel Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, May 19, 2018 at 6:22 PM, Dave Chinner wrote: > On Fri, May 18, 2018 at 01:43:14PM -0700, Steve French wrote: >> On Fri, May 18, 2018 at 11:46 AM, Ralph B=C3=B6hme wrot= e: >> > On Thu, May 17, 2018 at 09:36:36PM -0500, Steve French via samba-techn= ical wrote: >> >> Patch updated with additional tracepoint locations and some formattin= g >> >> improvements. There are some obvious additional tracepoints that coul= d >> >> be added, but this should be a reasonable group to start with. >> >> >> >> From edc02d6f9dc24963d510c7ef59067428d3b082d3 Mon Sep 17 00:00:00 200= 1 >> >> From: Steve French >> >> Date: Thu, 17 May 2018 21:16:55 -0500 >> >> Subject: [PATCH] smb3: Add ftrace tracepoints for improved SMB3 debug= ging >> >> >> >> Although dmesg logs and wireshark network traces can be >> >> helpful, being able to dynamically enable/disable tracepoints >> >> (in this case via the kernel ftrace mechanism) can also be >> >> helpful in more quickly debugging problems, and more >> >> selectively tracing the events related to the bug report. >> >> >> >> This patch adds 12 ftrace tracepoints to cifs.ko for SMB3 events >> >> in some obvious locations. Subsequent patches will add more >> >> as needed. >> >> >> >> Example use: >> >> trace-cmd record -e cifs >> >> >> >> trace-cmd show >> > >> > pardon my ignorance, but are these tracepoints usable with other traci= ng >> > frameworks like Systemtap? >> > >> > Last time I checked, Systemtap looked like *the* tool. > > Systemtap is great when you have a need for custom tracing. But for > day-to-day kernel development, tracepoints are far more useful > because they are always there and can cover all the common > situations that you need to trace. > > And when it comes to debugging a one-off user problem when the user > knows nothing about systemtap? Nothing beats asking the user > to run a trace on built-in tracepoints, reproduce the problem and > send the trace report back as per the above example. Yep - it has already been helpful in debugging problems. Main problem I hit using the new tracepoints over the past few days was entries being discarded from the buffer - I had a counter leak (now fixed) that xfstest showed ... but about 90% of the entries were dropped. Tried increasing buffer size but might have made things worse not better. Ideas how to force more entries to be saved? >> > Is there a generic trace >> > point infrastructure that tracing tools can consume, so we're not tied= to >> > ftrace? >> >> At the kernel filesystem/mm summit a few recommended using ftrace >> (trace-cmd). Don't know what >> the thinking is about this vs. systemtap these days. There was a nice >> three part series >> describing ftrace/trace-cmd on lwn >> (https://old.lwn.net/Articles/365835/) a while ago. >> >> In terms of useability "trace-cmd" looked good to me and much more >> powerful than the >> current dmesg based printk style debugging. > > And then you learn about trace_printk() for putting custom one-off > debug into the tracepoint stream and wonder why you didn't know > about this years ago :P Thanks for the pointers at the summit ... --=20 Thanks, Steve