Message ID | 20230913185528.770634-1-umang.jain@ideasonboard.com |
---|---|
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:612c:a8d:b0:3f2:4152:657d with SMTP id gr13csp19037vqb; Wed, 13 Sep 2023 11:57:58 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEjp7pwh0zO254sQU4fWFt0z9CjluO5o805eZ13qEmh65YyJdkpcsYyLPBYkSTvLs7q65iC X-Received: by 2002:a17:903:2308:b0:1c2:36a:52a5 with SMTP id d8-20020a170903230800b001c2036a52a5mr3876621plh.57.1694631478216; Wed, 13 Sep 2023 11:57:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1694631478; cv=none; d=google.com; s=arc-20160816; b=yiY04kHpm6/gDlhjxr+9HszTXrU/DOekQuHs3uIfNqgiDza+MAMvUYsbeKCLQftRMc TAkC4ANH7vLpKACQmkpjproJAtVv63uvSoYvRvVWoqPzok5dh99abv5GvF6b/5WCmuuN gsKMhJhoXqp06KreiLV3qUC4Qo1ks8QHsgcv2Lbd01xwz+QeNYw6wnsluStYsOK9IJIW HkLAJCn8FW4nPh9idTPVjFnWucDGj0xMJPiwuHqp/dKsiIBaizlXTR0rzHoVxtOrl1ZI MvHQsggVMvB+y5tm+DFPjCX1Uk7v+z0yqE8daga2/ZY/kZ7nf36MYmooL9WZCYa4FLGa usaQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=zmh+5MPEpW1jhNOAhks2gwGPQZ8EQetW/RG/OrXqMqs=; fh=niUzu51MmIB89fszqttdEot90gSzGQ5SaIAWLkEpq4A=; b=yiPvJ8Kb9Dm5HCmjKqIFsguYu0SGfMRueIkqtvOe8uDGR87i4hfwhCFFxMfBCR7d64 h2Kw7lXLpOue2xNcS8AW+Dm7fEVtUa7ilf190dFyyYM7KKDA1gpJgezIgWurWqllzWOK 9yq94dL7Bz7iXo1f0EJCPhx4ZcYV2y5cGoYAvqMfavKcdQMmfag+gnG3AaKGo+i+SGuS YMP3GRLBV5dB1EvGSKlW2XVsykTBcjWAcidlACj/OxQVmKenxl7wUFkiJkXTz5WsHeNY BpQRHxvTIJFEuZRW3dkyjzCE+1wINwc2pkM3pyfS8c0cbVoK7Kbrz5ohlEHABdpBI+97 xNoQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass (test mode) header.i=@ideasonboard.com header.s=mail header.b=HpkUBWIY; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from morse.vger.email (morse.vger.email. [23.128.96.31]) by mx.google.com with ESMTPS id o11-20020a170903210b00b001bbd0358ef7si10395551ple.518.2023.09.13.11.57.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 13 Sep 2023 11:57:58 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) client-ip=23.128.96.31; Authentication-Results: mx.google.com; dkim=pass (test mode) header.i=@ideasonboard.com header.s=mail header.b=HpkUBWIY; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by morse.vger.email (Postfix) with ESMTP id 0FFAF81BECB9; Wed, 13 Sep 2023 11:56:02 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at morse.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232065AbjIMSzu (ORCPT <rfc822;pwkd43@gmail.com> + 34 others); Wed, 13 Sep 2023 14:55:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46650 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229886AbjIMSzs (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Wed, 13 Sep 2023 14:55:48 -0400 Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 50D9B1985; Wed, 13 Sep 2023 11:55:44 -0700 (PDT) Received: from umang.jainideasonboard.com (unknown [103.86.18.170]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 7B713B1; Wed, 13 Sep 2023 20:54:06 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1694631249; bh=chNJdd1zcolnNrSINJke77grPOMpV8+bsyYop+wOaRo=; h=From:To:Cc:Subject:Date:From; b=HpkUBWIYpxt7jQtUdojaA1KRCB349FRTR7OA4RZpSB9d5yegO54mBmOi+9xxpykCe G75dWHjGhbbNHgjxU0ZYaDrqpubxyzh3u+88NJ5NlD+SB6BBaV/uoocmRXHh52OkqK hwmYDctllIyyvRwk4Z4EdbjdeKeEHH5bFxMjoqCA= From: Umang Jain <umang.jain@ideasonboard.com> To: linux-staging@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-rpi-kernel@lists.infradead.org, linux-media@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Stefan Wahren <stefan.wahren@i2se.com>, Greg Kroah-Hartman <gregkh@linuxfoundation.org>, Florian Fainelli <f.fainelli@gmail.com>, Adrien Thierry <athierry@redhat.com>, Dan Carpenter <error27@gmail.com>, Dave Stevenson <dave.stevenson@raspberrypi.com>, Kieran Bingham <kieran.bingham@ideasonboard.com>, Laurent Pinchart <laurent.pinchart@ideasonboard.com>, Phil Elwell <phil@raspberrypi.com>, Umang Jain <umang.jain@ideasonboard.com> Subject: [RFC PATCH v2 0/4] staging: vc04: Drop custom logging Date: Thu, 14 Sep 2023 00:25:24 +0530 Message-Id: <20230913185528.770634-1-umang.jain@ideasonboard.com> X-Mailer: git-send-email 2.40.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (morse.vger.email [0.0.0.0]); Wed, 13 Sep 2023 11:56:02 -0700 (PDT) X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on morse.vger.email X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1776949896921638790 X-GMAIL-MSGID: 1776949896921638790 |
Series |
staging: vc04: Drop custom logging
|
|
Message
Umang Jain
Sept. 13, 2023, 6:55 p.m. UTC
Hello, This series attempts to restart the discussion on custom logging used in VC04. In the last feedback gathered in [1] it seems that the logging would rather be moved to use dynamic debug. The series tries to move in that direction. The elephant in the room is the ability of turning on/off log levels, which this series just drops. Compensated by a crude strings ("error", "warning", "info"... etc) for easier grepping. The log category are also just strings (which probably can be transformed to dynamic debug class names moving forwards?). To move forwards, I would like feedback on the broader direction. There are couple of TODOs in each of the patch (summarised in commit messages) which require case-by-case discussion. Additional high-level questions to move forwards: 1. Is loss of log levels by moving to dynamic debug, is actually a concern? Is dynamic debug a valid replacement? 2. Whether debugfs should be dropped as well, found vestigial in [2] 3. whether vchiq_log_trace() should actually be tracing support for VC04 All this is done to elimiate the TODO item in: drivers/staging/vc04_services/interface/TODO * Cleanup logging mechanism Addtional comments/questions are welcome. Thank you. Tested over media-tree master with dynamic debug configs enabled and drivers/staging/vc04_services/interface/TESTING. [1] https://lore.kernel.org/lkml/20230118115810.21979-1-umang.jain@ideasonboard.com/ [2] https://lore.kernel.org/lkml/Y8lHqd9FlxiXTLuW@kroah.com/ Umang Jain (4): staging: vc04: Convert vchiq_log_error() to use dynamic debug staging: vc04: Convert vchiq_log_warning() to use dynamic debug staging: vc04: Convert vchiq_log_info() to use dynamic debug staging: vc04: Convert vchiq_log_trace() to use dynamic debug .../interface/vchiq_arm/vchiq_arm.c | 127 +++++----- .../interface/vchiq_arm/vchiq_connected.c | 6 +- .../interface/vchiq_arm/vchiq_core.c | 225 ++++++++---------- .../interface/vchiq_arm/vchiq_core.h | 46 ++-- .../interface/vchiq_arm/vchiq_dev.c | 41 ++-- 5 files changed, 232 insertions(+), 213 deletions(-) base-commit: 0bb80ecc33a8fb5a682236443c1e740d5c917d1d
Comments
On Thu, Sep 14, 2023 at 12:25:24AM +0530, Umang Jain wrote: > Hello, > > This series attempts to restart the discussion on custom logging used > in VC04. In the last feedback gathered in [1] it seems that the logging > would rather be moved to use dynamic debug. The series tries to move > in that direction. > > The elephant in the room is the ability of turning on/off log levels, > which this series just drops. Compensated by a crude strings > ("error", "warning", "info"... etc) for easier grepping. > > The log category are also just strings (which probably can be transformed > to dynamic debug class names moving forwards?). > > To move forwards, I would like feedback on the broader direction. > There are couple of TODOs in each of the patch (summarised in commit > messages) which require case-by-case discussion. > > Additional high-level questions to move forwards: > 1. Is loss of log levels by moving to dynamic debug, is actually a > concern? Is dynamic debug a valid replacement? Dynamic debug is honestly going to be an improvement. I guess, Greg and I said this back in Jan. > 2. Whether debugfs should be dropped as well, found vestigial in [2] Yes. The "vchiq/log" should be removed. Ideally as part of this patchset so it's easier to understand. > 3. whether vchiq_log_trace() should actually be tracing support for VC04 That can be done later if people want. No need to discuss it now. regards, dan carpenter
Hi, Am 14.09.23 um 08:35 schrieb Dan Carpenter: > On Thu, Sep 14, 2023 at 12:25:24AM +0530, Umang Jain wrote: >> Hello, >> >> This series attempts to restart the discussion on custom logging used >> in VC04. In the last feedback gathered in [1] it seems that the logging >> would rather be moved to use dynamic debug. The series tries to move >> in that direction. >> >> The elephant in the room is the ability of turning on/off log levels, >> which this series just drops. Compensated by a crude strings >> ("error", "warning", "info"... etc) for easier grepping. >> >> The log category are also just strings (which probably can be transformed >> to dynamic debug class names moving forwards?). >> >> To move forwards, I would like feedback on the broader direction. >> There are couple of TODOs in each of the patch (summarised in commit >> messages) which require case-by-case discussion. >> >> Additional high-level questions to move forwards: >> 1. Is loss of log levels by moving to dynamic debug, is actually a >> concern? Is dynamic debug a valid replacement? > > Dynamic debug is honestly going to be an improvement. I guess, Greg and > I said this back in Jan. > >> 2. Whether debugfs should be dropped as well, found vestigial in [2] > > Yes. The "vchiq/log" should be removed. Ideally as part of this > patchset so it's easier to understand. Yes, but please do not remote vchiq_debugfs entirely. I'm working on a patch to move the state dump (debug feature) from the character device /dev/vchiq to debugfs /sys/kernel/debug/vchiq/dump_state. > >> 3. whether vchiq_log_trace() should actually be tracing support for VC04 > > That can be done later if people want. No need to discuss it now. > > regards, > dan carpenter >
Hi Stefan, On 9/17/23 9:06 PM, Stefan Wahren wrote: > Hi, > > Am 14.09.23 um 08:35 schrieb Dan Carpenter: >> On Thu, Sep 14, 2023 at 12:25:24AM +0530, Umang Jain wrote: >>> Hello, >>> >>> This series attempts to restart the discussion on custom logging used >>> in VC04. In the last feedback gathered in [1] it seems that the logging >>> would rather be moved to use dynamic debug. The series tries to move >>> in that direction. >>> >>> The elephant in the room is the ability of turning on/off log levels, >>> which this series just drops. Compensated by a crude strings >>> ("error", "warning", "info"... etc) for easier grepping. >>> >>> The log category are also just strings (which probably can be >>> transformed >>> to dynamic debug class names moving forwards?). >>> >>> To move forwards, I would like feedback on the broader direction. >>> There are couple of TODOs in each of the patch (summarised in commit >>> messages) which require case-by-case discussion. >>> >>> Additional high-level questions to move forwards: >>> 1. Is loss of log levels by moving to dynamic debug, is actually a >>> concern? Is dynamic debug a valid replacement? >> >> Dynamic debug is honestly going to be an improvement. I guess, Greg and >> I said this back in Jan. +1 >> >>> 2. Whether debugfs should be dropped as well, found vestigial in [2] >> >> Yes. The "vchiq/log" should be removed. Ideally as part of this >> patchset so it's easier to understand. > > Yes, but please do not remote vchiq_debugfs entirely. I'm working on a > patch to move the state dump (debug feature) from the character device > /dev/vchiq to debugfs /sys/kernel/debug/vchiq/dump_state. Can't the state dump be printed to dev_dbg() ? Will it pollute the kernel log? Having debugfs for a single dump doesn't seem worthwhile if the state dump can be incorporated to dev_dbg() too. > >> >>> 3. whether vchiq_log_trace() should actually be tracing support for >>> VC04 >> >> That can be done later if people want. No need to discuss it now. Thanks Dan. >> >> regards, >> dan carpenter >>
Hi Umang, Am 23.09.23 um 11:39 schrieb Umang Jain: > Hi Stefan, > > On 9/17/23 9:06 PM, Stefan Wahren wrote: >> Hi, >> >> Am 14.09.23 um 08:35 schrieb Dan Carpenter: >>> On Thu, Sep 14, 2023 at 12:25:24AM +0530, Umang Jain wrote: >>>> Hello, >>>> >>>> This series attempts to restart the discussion on custom logging used >>>> in VC04. In the last feedback gathered in [1] it seems that the logging >>>> would rather be moved to use dynamic debug. The series tries to move >>>> in that direction. >>>> >>>> The elephant in the room is the ability of turning on/off log levels, >>>> which this series just drops. Compensated by a crude strings >>>> ("error", "warning", "info"... etc) for easier grepping. >>>> >>>> The log category are also just strings (which probably can be >>>> transformed >>>> to dynamic debug class names moving forwards?). >>>> >>>> To move forwards, I would like feedback on the broader direction. >>>> There are couple of TODOs in each of the patch (summarised in commit >>>> messages) which require case-by-case discussion. >>>> >>>> Additional high-level questions to move forwards: >>>> 1. Is loss of log levels by moving to dynamic debug, is actually a >>>> concern? Is dynamic debug a valid replacement? >>> >>> Dynamic debug is honestly going to be an improvement. I guess, Greg and >>> I said this back in Jan. > > +1 >>> >>>> 2. Whether debugfs should be dropped as well, found vestigial in [2] >>> >>> Yes. The "vchiq/log" should be removed. Ideally as part of this >>> patchset so it's easier to understand. >> >> Yes, but please do not remote vchiq_debugfs entirely. I'm working on a >> patch to move the state dump (debug feature) from the character device >> /dev/vchiq to debugfs /sys/kernel/debug/vchiq/dump_state. > > Can't the state dump be printed to dev_dbg() ? Will it pollute the > kernel log? Having debugfs for a single dump doesn't seem worthwhile if > the state dump can be incorporated to dev_dbg() too. debugfs was created for a good reason. dev_dbg() is a nice tool, but it isn't useful in every situation. In case of communication the usage of counter is quite popular and removing this ability would make debugging not easier. Try to make "cat /dev/vchiq" you will see you don't want pollute the kernel log with this kind of information. Actually i don't see a problem with have a single dump in debugfs. Let me send a draft of my changes for a better discussion ... Regards Stefan >> >>> >>>> 3. whether vchiq_log_trace() should actually be tracing support for >>>> VC04 >>> >>> That can be done later if people want. No need to discuss it now. > > Thanks Dan. >>> >>> regards, >>> dan carpenter >>> >
Just so it's clear, Stefan and I are on the same page on this. State dumps to debugfs are fine. regards, dan carpenter