Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp122957pxb; Wed, 3 Nov 2021 00:58:08 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxFO8af76ePxS0ysAX3VHLFZggDHZjn/JvjqUNfS9amU1QpBfIAfw2qy9J6BA9SicAVazEn X-Received: by 2002:a05:6e02:b24:: with SMTP id e4mr6123595ilu.17.1635926287864; Wed, 03 Nov 2021 00:58:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1635926287; cv=none; d=google.com; s=arc-20160816; b=hBt1l/AGIuO/l8gPf1xXn2Ho3Revam7taZKQKZx8ElzKrnkycIUWi9t//lC/mMII4X iD2dIY8UrzSxXgK3Z5roGIjusD9PRKZ+hKXDwo+FzpYMqbqP7jd1Ir92xChxbFrSX25G 2Fp+hmMnc4MG1K+oCbolLEdZxv2U3uUbdsg7peR7o9uoQiGl3k3P53PW17ky0IoQDvux Ri29uMor4ktE/Al8rZy+1us7yG5kmD5MFdWI1D990vG1H7U3m+89vzq4RxKWf2Avdze9 wGreWGO7nRpSPnBr0xnjmhaReGOLHRHu+cK7kdSv+wnUx8FARnMoAs5muJ7QenVqIAGA mfFQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=V04PRVMq0Z/UDJz0xLKl1Xoe9Fq20tPJIRoMB0DtmQM=; b=uaVSl1PkCwJAZvzwYEBgHNEFB85mPmxBpL3B3VBAxhbIuGEJcnbhG2WNTEBWNY6Hk1 qNuZJJmIPKamb8JjcvFyD1j+D7tPNIRGo8CejmtosQ/SyIKBmRfoL1A35BvgFycGo8PE rm8kaqP+a6NSwVYWjowDKBa6nms5m+27/2+vcuqz+nqAVlJSL8p/97/gWxqA2UC9gPPo wawLMwNbfghwLw4JbMytmwqpqbJwbtYhdXdfD8hh0ssM3v19ZjwXdZ11p+/y6LOR5f3G TJyEeufR5MIAu/PxLgKcEiXQG6Oaw9WoNtLLOw8Rbzm14/YjqVPqkgnoAGptK9YHhUzK mqNQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=BFqnOTDG; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id c1si3533322iow.43.2021.11.03.00.57.42; Wed, 03 Nov 2021 00:58:07 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=BFqnOTDG; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231254AbhKCIAK (ORCPT + 99 others); Wed, 3 Nov 2021 04:00:10 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:38513 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231425AbhKCIAH (ORCPT ); Wed, 3 Nov 2021 04:00:07 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1635926248; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=V04PRVMq0Z/UDJz0xLKl1Xoe9Fq20tPJIRoMB0DtmQM=; b=BFqnOTDGAX8wZQWWojNFjrmDMz04R5dMGxGrzleARMpvDPbyLRkx4shl35U7OS5lDa8cvz smmgh81ZTnMD2eMLCkNWLe5PRCXv5dE46hvJdRp/7S/+zmm9fGLlV9zRytb0Z57C581pQO ticBAtQ1xDNPl2VZ+ILCFopsSxR22hU= Received: from mail-ed1-f71.google.com (mail-ed1-f71.google.com [209.85.208.71]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-262-FGIDih-WM2y9ojLCSxI2DA-1; Wed, 03 Nov 2021 03:57:25 -0400 X-MC-Unique: FGIDih-WM2y9ojLCSxI2DA-1 Received: by mail-ed1-f71.google.com with SMTP id g3-20020a056402424300b003e2981e1edbso1727997edb.3 for ; Wed, 03 Nov 2021 00:57:25 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=V04PRVMq0Z/UDJz0xLKl1Xoe9Fq20tPJIRoMB0DtmQM=; b=dL1U5x0tvq1w04hh4kpwyzoOS2bdopengyt92lR6duoGUWlq3nB1IGQ1tdAky3NSU4 D6s76MK/J2TUf+P00TJoV7bhsqwFyYWV3h48fhj7o3EDTTOYMuzSFhdZkVrUHO7763Rh Nk4a9mHFt54dLI2M8ATUJqgeO3oY+EpWz8Z1kK2KKA76V/M9pdtuTt2c10wbuPjtZxi3 YkDM+lCNaOFeiQoWtxyT4+uri/VS8sWwCJ4OmB09J5kttdYrkcI50PQyiPx0IApxzS/6 SQJK0z3GS8uH+V+YLbu3M9OSxdu4nbbYd6TijLfl8pL/VmJ01RTQZyLh9tEYANR4G+gQ Uryw== X-Gm-Message-State: AOAM532RbZ0Gr39mCt9THRep4ZxQzj288d0fxaGR3Vasgon+YSrZpggK bZ0NhaCAvjwruZtuE3sAlInNTjuP4HlIowGclxPJwNcuvS4pDuBeaDnDcvJREaZ8F6wXPqtXj26 9zStoMtgvwPCPixItar4CIfByV5krZfJyZvxI X-Received: by 2002:a05:6402:1744:: with SMTP id v4mr48796865edx.366.1635926244381; Wed, 03 Nov 2021 00:57:24 -0700 (PDT) X-Received: by 2002:a05:6402:1744:: with SMTP id v4mr48796842edx.366.1635926244113; Wed, 03 Nov 2021 00:57:24 -0700 (PDT) MIME-Version: 1.0 References: <163413628188.6408.17033105928649076434.stgit@bazille.1015granger.net> <20211013155926.GC6260@fieldses.org> <53AEBF77-7470-4B52-B69E-3CC515C3F393@oracle.com> <8B619507-4BB3-48A8-9124-8501302CAA59@oracle.com> In-Reply-To: <8B619507-4BB3-48A8-9124-8501302CAA59@oracle.com> From: David Wysochanski Date: Wed, 3 Nov 2021 03:56:47 -0400 Message-ID: Subject: Re: [PATCH v1 0/6] Deprecate dprintk in svcrdma To: Chuck Lever III Cc: Bruce Fields , linux-rdma , Linux NFS Mailing List Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org On Wed, Oct 13, 2021 at 5:03 PM Chuck Lever III wrote: > > > > > On Oct 13, 2021, at 2:35 PM, David Wysochanski wrote: > > > > On Wed, Oct 13, 2021 at 12:50 PM Chuck Lever III wrote: > >> > >> > >> > >>> On Oct 13, 2021, at 11:59 AM, J. Bruce Fields wrote: > >>> > >>> On Wed, Oct 13, 2021 at 10:46:49AM -0400, Chuck Lever wrote: > >>>> This patch series moves forward with the removal of dprintk in > >>>> SUNRPC in favor of tracepoints. This is the last step for the > >>>> svcrdma component. > >>> > >>> Makes sense to me. > >>> > >>> I would like some (very short) documentation, somewhere. Partly just > >>> for my sake! I'm not sure exactly what to recommend to bug reporters. > >>> > >>> I guess > >>> > >>> trace-cmd record -e 'sunrpc:*' > >>> trace-cmd report > >>> > >>> would be a rough substitute for "rpcdebug -m rpc -s all"? > >> > >> It would, but tracepoints can be enabled one event > >> at a time. If you're looking for a direct replacement > >> for a specific rpcdebug invocation, it might be better > >> to examine the current sunrpc debug facilities and > >> provide specific command lines to mimic those. > >> > >> "rpcdebug -vh" gives us: > >> > >> rpc xprt call debug nfs auth bind sched trans svcsock svcdsp misc cache all > >> nfs vfs dircache lookupcache pagecache proc xdr file root callback client mount fscache pnfs pnfs_ld state all > >> nfsd sock fh export svc proc fileop auth repcache xdr lockd all > >> nlm svc client clntlock svclock monitor clntsubs svcsubs hostcache xdr all > >> > >> > >> If tracepoints are named carefully, we can provide > >> specific command lines to enable them as groups. So, > >> for instance, I was thinking rpcdebug might display: > >> > >> trace-cmd list | grep svcrdma > >> > >> to list tracepoints related to server side RDMA, or: > >> > >> trace-cmd list | grep svcsock > >> > >> to show tracepoints related to server side sockets. > >> Then: > >> > >> trace-cmd record -e sunrpc:svcsock\* > >> > >> enables just the socket-related trace events, which > >> coincidentally happens to line up with: > >> > >> rpcdebug -m rpc -s svcsock > >> > >> > >>> Do we have a couple examples of issues that could be diagnosed with > >>> tracepoints? > >> > >> Anything you can do with dprintk you can do with trace > >> points. Plus because tracepoints are lower overhead, they > >> can be enabled and used in production environments, > >> unlike dprintk. > >> > >> Also, tracepoints can trigger specific user space actions > >> when they fire. You could for example set up a tracepoint > >> in the RPC client that fires when a retransmit timeout > >> occurs, and it could trigger a script to start tcpdump. > >> > >> > >>> In the past I don't feel like I've ended up using dprintks > >>> all that much; somehow they're not usually where I need them. But maybe > >>> that's just me. And maybe as we put more thought into where tracepoints > >>> should be, they'll get more useful. > >> > >>> Documentation/filesystems/nfs/, or the linux-nfs wiki, could be easy > >>> places to put it. Though *something* in the man pages would be nice. > >>> At a minimum, a warning in rpcdebug(8) that we're gradually phasing out > >>> dprintks. > >> > >> As I understood the conversation last week, SteveD and > >> DaveW volunteered to be responsible for changes to > >> rpcdebug? > >> > > > > Well I don't remember it exactly like that, but it's probably close. > > > > I made a suggestion for the last kernel patch that deprecates any > > rpcdebug facility, to leave one dfprintk in, stating there is no > > information in the kernel anymore for this facility, so not to expect > > this rpcdebug flag to produce any meaningful debug output, and > > possibly redirect to ftrace facilities. I brought that idea up > > because of my fscache patches which totally removed the last dfprintk > > in NFS fscache, and I wasn't sure what the deprecation procedure > > was. As I recall you didn't like that idea as it was never done before > > with other rpcdebug flag deprecations, and it was shot down. > > > > I suppose we could put the same type of userspace patch to rpcdebug > > that looks for kernel versions and prints a message if someone tries > > to use a deprecated flag? Would that be better? > > I don't recall discussing leaving one dprintk in place for > each facility. My impression is that changing rpcdebug in > this manner is what was decided during that conversation. > Just to follow up on this since I think this was an action item more appropriate for me. FYI, I have spoken to a couple Red Hat support engineers and asked them to work on: 1. man page update for rpcdebug 2. rpcdebug warning if a flag is enabled on a kernel that does not produce any output They are making good progress and I hope they will post something to the list within week or two. > > >> So far we haven't had much documentation for dprintk. That > >> means we are starting more or less from scratch for > >> explaining observability in the NFS stacks. Free rein, and > >> all that. > >> > >> -- > >> Chuck Lever > > -- > Chuck Lever > > >