From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-13.3 required=3.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_IN_DEF_DKIM_WL autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4DA8FC433EF for ; Tue, 14 Sep 2021 17:32:10 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 3459C60F70 for ; Tue, 14 Sep 2021 17:32:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230305AbhINRd0 (ORCPT ); Tue, 14 Sep 2021 13:33:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53892 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230019AbhINRdY (ORCPT ); Tue, 14 Sep 2021 13:33:24 -0400 Received: from mail-yb1-xb31.google.com (mail-yb1-xb31.google.com [IPv6:2607:f8b0:4864:20::b31]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6681EC061764 for ; Tue, 14 Sep 2021 10:32:07 -0700 (PDT) Received: by mail-yb1-xb31.google.com with SMTP id c206so29992195ybb.12 for ; Tue, 14 Sep 2021 10:32:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=+3VBdlnD5tDSjFwQi8EY8+Mvb+JS3UIR+Tge1QvZxrw=; b=Ra72o6AUkEG7riwrCrXA86JurDy6W5ZQsxVDxbDXAH73P0Ra3IPts1JHfFlgqfOMAB htnkLp7mONdM3g2Xe7mo4qLSGJnShNBqVCtevUzNEyNlz+oh7CPIqP43OOSQNtGr2oOq xjhlELP4yM6UDuaRq8tvfOhG4MNpLR0b97Jxqa9/CSiLwg+w6ICckpfKa6FjNBA3q6lx ls5NwdczWKJHsYtAKuU8cuXn3Ih8RT4CwFO071cOFbYCEsYsEXp3uwo5NNylzFg+b7C3 YfYnKNCb5FMzg+yDTar2GToQbg9F6PxsxMMNkbEYVqZnxLdOrRz4IRsB25765yweP7HP cKRg== 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=+3VBdlnD5tDSjFwQi8EY8+Mvb+JS3UIR+Tge1QvZxrw=; b=tQI17qDsB9T5V7wJQhc9TSUIopg1AF4KSK99dPjWl7YDGD9+/pOODpqVecy8afO3Hq Zj6Z7VWfYfuKwpBTizqkNvP7rTJgmDeZk3O+/BIqRJ4ORwfmfYcfAilrw8Avi8GiSude BP39bUOMjojGSdCOrFx3MsFzUhjLgqiooP7djoiOGraQNGnGT0e6mYMOXJ2F929wWSvs 2FWOFOAj4JEmtU8/aM4d1Mg5ca0Z4AHp7jTEEex4JbrpPJ/Q6PMmEw7zeigoLgtIafGi fPdxxxQiJ8csiJeIZp7Sgtq/VGHVK31Xk7eYR1L+6k/+T5mnfdmoxGmtDZ6Zxv0u8HTa d9GA== X-Gm-Message-State: AOAM5315BQ3p1ac6ZReJLWzdmsgm3A6Th/5f0g3oL/Ph+hvZT/qIpchM GgVaOpmiY3V7KBpKMLXYNTfHNoEeWpgGD3tLUV75vDrWxOg+RA== X-Google-Smtp-Source: ABdhPJx90Za08zcRHVf7y+SxDDBaxyRY2wlLiV1YOOtINwYhwMsDEMGKh0JD49mJQNR+ddYHYO/CA4CpRRL1vbsTuR0= X-Received: by 2002:a25:b94:: with SMTP id 142mr374666ybl.508.1631640726428; Tue, 14 Sep 2021 10:32:06 -0700 (PDT) MIME-Version: 1.0 References: <20210914043928.4066136-1-saravanak@google.com> <20210914043928.4066136-6-saravanak@google.com> In-Reply-To: From: Saravana Kannan Date: Tue, 14 Sep 2021 10:31:30 -0700 Message-ID: Subject: Re: [PATCH v1 5/5] driver core: Add fw_devlink.debug command line boolean parameter To: Rob Herring Cc: Andrew Lunn , Greg Kroah-Hartman , "Rafael J. Wysocki" , John Stultz , Marek Szyprowski , Geert Uytterhoeven , Vladimir Oltean , Android Kernel Team , "linux-kernel@vger.kernel.org" Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Sep 14, 2021 at 9:52 AM Rob Herring wrote: > > On Tue, Sep 14, 2021 at 11:44 AM Andrew Lunn wrote: > > > > > I did think of this, but the problem is that dynamic debug logs can > > > get compiled out (when DYNAMIC_DEBUG isn't set). I think debugging of > > > fw_devlink needs to be possible without having to recompile the > > > kernel. So in a sense similar to how initcall_debug works today. > > > > My off the shelf Debian kernel has it enabled. Maybe you can check > > other mainline distributions and see if it is enabled by default. > > Right, I would expect users that can't rebuild their kernel easily > would have it enabled. > > > You are also on a slippery path. You argue this is needed all the time > > and add a custom knob. Somebody else adds a new feature which they > > also argue always needs bug, and add there own custom knob. We soon > > have lots of custom knobs, each doing it slightly differently, in > > different places. Chaos. So you need a really good argument why your > > code really is special. > > > > I would suggest you start with dynamic debug, and collect some > > statistics of how often you need to ask people to recompile their > > kernel. > > I agree. Fair enough -- Andrew/Rob. > > What would be nice is documenting what needs to be set for devlink. > What I used was just 'dyndbg="file drivers/base/core.c +p"' Yeah, I was thinking if we went with dynamic debug I'd have something I'll copy paste as a reply to any fw_devlink debug email thread. Where would be a good place to document this? I was actually thinking of making fw_devlink.debug=1 be an alias for something like: dyndbg="func device_link_add +p; func device_links_check_suppliers +p".... So that people don't have to remember what to copy paste into their command line as things change. -Saravana