Received: by 2002:ab2:6857:0:b0:1ef:ffd0:ce49 with SMTP id l23csp2540167lqp; Mon, 25 Mar 2024 01:46:02 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCV/CmQdE3YDZtKlnEZ4KYooBn+Rk/lAAMdEZrLlmLwFN8FscpZgf89sU/ptHQmVf9/llisLk+rK4AbkN/jX0HmsvmYs2zkV3ZPVUrHUQQ== X-Google-Smtp-Source: AGHT+IGUsujxjWtlEsqh80zr5EQD2Hjuez21mkRHdrmy0ZijSJHii4pDzNLfsxkeYcvYTtlbAWPk X-Received: by 2002:a05:6214:e45:b0:696:767f:39c3 with SMTP id o5-20020a0562140e4500b00696767f39c3mr9088155qvc.26.1711356362356; Mon, 25 Mar 2024 01:46:02 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711356362; cv=pass; d=google.com; s=arc-20160816; b=Qem5rPVETPzpepUyCzTBkDdYs44DpTebhYmRWoF+QyUrss/93gAjdVv/jUc7F3chET 5+jUJvFuAcfg3VIvahg+IpE5FnLISFNoFRp5YiFT0jFbZZzvmWZgCIibOa4IJOrpis1S o2pWM31VXAvChlA8FHL4oTCCE6wvnilQnA27uq4wePHajjOZKtdVnKZd5pXNPzJ6Nk31 XnWbPCjw++kQrN1QW021oB4aeyDXVqeG3YOM8m0a5ZgaFXSg8rDk+yI/SsUYaLRJaguh pQ0CBR9c9L8Jdd4EyS7RcSRbvTVdR4HvuvmQZNeJkij9/d20Cb5WngvuIFQOJiE0lmrT +7+Q== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:mail-followup-to :message-id:subject:cc:to:from:date:feedback-id:dkim-signature :dkim-signature; bh=Dh+dJEY2gJkF1hs/hYpFYfuFKg28LMybI2iLz5LxJGE=; fh=7tCR2OY+o2tzhFP0PdsbGzYyG96Vzu3n/lYSO2E5INs=; b=Z9HEMHu5rqWZdoV0WM0o4g3BcdgyuqqleQtxBi3+rlKT9uzWoazcBDh0lLqKWk+dQb 3x8t3+amM11IhHTBqv6tRDaaW5kT0ohJmEjK63TcwJ5AZciP59oXnIuhXXNLLnF1pQPD JfeXu9BkjLs3lCL40XhUs26bWYyQbp2CulKyoIhIFC3pPqgEgUjO+mJsAILnW3AQ6pHb KgA1IHca5AAtNCpLd+gKQAvxNFd6qoqItRn7/9jGw+4EXjI7DtlNcH+qXB8XQDWjuWBl r1U+/Uhk5W6cZ7LEWcX86fmOClTqY3Zpx5ZRwuHkl3xM1Zfqn2VdP3BAsRDye+/DJXuO tUXQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@sakamocchi.jp header.s=fm2 header.b=KTkaaqjI; dkim=pass header.i=@messagingengine.com header.s=fm2 header.b=Qo4Q5kCd; arc=pass (i=1 spf=pass spfdomain=sakamocchi.jp dkim=pass dkdomain=sakamocchi.jp dkim=pass dkdomain=messagingengine.com dmarc=pass fromdomain=sakamocchi.jp); spf=pass (google.com: domain of linux-kernel+bounces-116359-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-116359-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=sakamocchi.jp Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id q14-20020ad4574e000000b006968e7aaed9si1596680qvx.419.2024.03.25.01.46.02 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 25 Mar 2024 01:46:02 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-116359-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@sakamocchi.jp header.s=fm2 header.b=KTkaaqjI; dkim=pass header.i=@messagingengine.com header.s=fm2 header.b=Qo4Q5kCd; arc=pass (i=1 spf=pass spfdomain=sakamocchi.jp dkim=pass dkdomain=sakamocchi.jp dkim=pass dkdomain=messagingengine.com dmarc=pass fromdomain=sakamocchi.jp); spf=pass (google.com: domain of linux-kernel+bounces-116359-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-116359-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=sakamocchi.jp Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 189001C2FB43 for ; Mon, 25 Mar 2024 08:46:02 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id F223D17106E; Mon, 25 Mar 2024 04:17:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=sakamocchi.jp header.i=@sakamocchi.jp header.b="KTkaaqjI"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="Qo4Q5kCd" Received: from out4-smtp.messagingengine.com (out4-smtp.messagingengine.com [66.111.4.28]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D7B7C170EAC for ; Mon, 25 Mar 2024 00:41:39 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=66.111.4.28 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711327302; cv=none; b=Xn6BU1t2YFXJVB7V4jtrhTG6Yo6JQvisDCWqndJ4QWjydSnw0FHDFqHZ67J+rKPMmisInXxvOMNYSmQnOC03kXg6qWMwEN1EGTHA6YqSsIJ+b9HfFIeg6Bxp94p1ThQFrEiDNR2Jek97/C1quDm54ZCcU6dDQLHCMdTL7s0A/5g= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711327302; c=relaxed/simple; bh=1R6tsIfyD4FKqYacylId0ehCe60JV+xN2G04+gjdyeE=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=WOT+isnmP5b/uwuOZZf/oj+uHzrNIVCzFCrhmLujASUWuasoDc1LH71VPXhDJTnyupIXbwaBk8EoZohnl2M1Jh+reL0/OaGkCba6C7s5EEpTnYluJewlxCtbDG1lheUqs3RJ1yJqmQ772IoNDipxkg/TlGS/QKq4Vfgcx2Fl5OM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=sakamocchi.jp; spf=pass smtp.mailfrom=sakamocchi.jp; dkim=pass (2048-bit key) header.d=sakamocchi.jp header.i=@sakamocchi.jp header.b=KTkaaqjI; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b=Qo4Q5kCd; arc=none smtp.client-ip=66.111.4.28 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=sakamocchi.jp Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=sakamocchi.jp Received: from compute7.internal (compute7.nyi.internal [10.202.2.48]) by mailout.nyi.internal (Postfix) with ESMTP id CF9C75C004D; Sun, 24 Mar 2024 20:41:38 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute7.internal (MEProxy); Sun, 24 Mar 2024 20:41:38 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sakamocchi.jp; h=cc:cc:content-type:content-type:date:date:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:subject:subject:to:to; s=fm2; t=1711327298; x= 1711413698; bh=Dh+dJEY2gJkF1hs/hYpFYfuFKg28LMybI2iLz5LxJGE=; b=K TkaaqjIGBzU26M4F/P0PKnLJlKxDm/gMiENw+SrBVHuPZBN9mFg3jhLt2CTGIOKx dc9sZQkhgKsxzNHtQe5YvU6ry2fc4Mn/5zzCr0/weXkkIOO/aJJWLj00z7YPT83X +EwygA45GHyViS0xWX/P2tfgkeKgAiMYCYkqvqkw8YQEfeTkenHnnhuhKxTphrBN MqVmS8abJ/kkHYREQCMyoP7Isrc4/wox1b/1qNKRTlkd78cImzPG0snR5e2wFAVB 3O815ZZ90mRSYP9jMtCnSDw0jDhARufD0fYebWojU8oBv8BRFwWwCycxHSF+5nCn 4BPpkARPOkZf9TN0/C80Q== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:subject:subject:to :to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm2; t=1711327298; x=1711413698; bh=Dh+dJEY2gJkF1hs/hYpFYfuFKg28 LMybI2iLz5LxJGE=; b=Qo4Q5kCd0yAKtC5UZTJrHDhuWA001qerYR1P4tzHFoS6 cEKo8iwioLuRSm4Ey7hP8knfY4JXOxO36JUBiNj6o9HSYVyPApo3Em4qhlqPoaVh kLhdZNgMONYAv2jwsgAyb9zChCimxdBCLSuNXrduByQO0c/bx11X7zaXiyb7Vii6 zsUKFiYKfIJKHUzJavUXNLSxtCo/RDRz8CrftNdX4TV8lIN14SitYK8HSfCkIQTD QQp8s6BjK/q9PRSiWf8XByw6ybCT28D8xWX0Hmxz3OSvUAhFl1G6g7ufdDEmBVhq oe9AgsrjjbxzWx+fJxi9z7ppYaHCwCETLFxUxeMsDA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledruddtkedgvdehucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepfffhvfevuffkfhggtggujgesthdtredttddtvdenucfhrhhomhepvfgrkhgr shhhihcuufgrkhgrmhhothhouceoohdqthgrkhgrshhhihesshgrkhgrmhhotggthhhird hjpheqnecuggftrfgrthhtvghrnhepveeilefhudekffehkeffudduvedvfeduleelfeeg ieeljeehjeeuvdeghfetvedvnecuffhomhgrihhnpehkvghrnhgvlhdrohhrghenucevlh hushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehoqdhtrghkrghs hhhisehsrghkrghmohgttghhihdrjhhp X-ME-Proxy: Feedback-ID: ie8e14432:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sun, 24 Mar 2024 20:41:37 -0400 (EDT) Date: Mon, 25 Mar 2024 09:41:34 +0900 From: Takashi Sakamoto To: Adam Goldman Cc: linux1394-devel@lists.sourceforge.net, linux-kernel@vger.kernel.org Subject: Re: [PATCH] firewire: core: option to log bus reset initiation Message-ID: <20240325004134.GA21329@workstation.local> Mail-Followup-To: Adam Goldman , linux1394-devel@lists.sourceforge.net, linux-kernel@vger.kernel.org References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Hi Adam, On Wed, Mar 20, 2024 at 02:14:11AM -0700, Adam Goldman wrote: > Add a debug parameter to firewire-core, analogous to the one in > firewire-ohci. When this is set to 1, log when we schedule, delay, or > initiate a bus reset. Since FireWire bus resets can originate from any > node on the bus, specific logging of the resets we initiate provides > additional insight. > > Signed-off-by: Adam Goldman Thanks for the patch. I applied it to for-next[1]. Now we have two debug parameters per module for the slightly-similar purpose. In my opinion, it is a pretty cumbersome to enable them when checking bus-reset behaviour. I think it is time to investigate the other way. Linux Kernel Tracepoints[2] is one of options. Roughly describing, the tracepoints mechanism allows users to deliver structured data from kernel space to user space via ring-buffer when enabling it by either sysfs or kernel command-line parameters. Linux kernel also has a command-line parameter to redirect the human-readable formatted data to kernel log[3]. I think it is suitable in the case. It requires many work to replace the existent debug parameter of firewire-ohci, while it is a good start to work just for bus-reset debug. The data structure layout should be pre-defined in each subsystem, thus we need to decide it. In my opinion, it would be like: ``` struct bus_reset_event { enum reason { Initiate, Schedule, Postpone, Detect, }, // We can put any other data if prefering. } ``` Would I ask your opinion about my idea? [1] https://git.kernel.org/pub/scm/linux/kernel/git/ieee1394/linux1394.git/log/?h=for-next [2] https://docs.kernel.org/trace/tracepoints.html [3] 'tp_printk' in kernel/trace/trace.c, 'trace_event' in kernel/trace/trace_event.c Regards Takashi Sakamoto