Received: by 2002:a05:7412:518d:b0:e2:908c:2ebd with SMTP id fn13csp463536rdb; Thu, 5 Oct 2023 10:53:03 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHT7bOsxcvM9gXgRT7/rlg0do1lyzY++gQj7jcW3x3yDGHgqakjQtVDab6spMm/uuke8OQr X-Received: by 2002:a05:6a00:cd1:b0:690:c1e5:9359 with SMTP id b17-20020a056a000cd100b00690c1e59359mr6983318pfv.17.1696528382934; Thu, 05 Oct 2023 10:53:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696528382; cv=none; d=google.com; s=arc-20160816; b=hvdQV46q4/WFJPeaETSyLMNkh7Mu74+kPTd/gGuFNVPG+MmNy9ofL2/69pOzFVrY8d 0P7d1JdY93Jt9jFSxGI6xPcKQUfsSF9/MPgwDJkeGT2GQEOODaK9rLGTM7fC43hW9EiC gEeOkjvuN7DLxls9+6FhtvwEVbakLv4+kpx1uSNnMWxyBZ2WWodKOfvJOkiB4Q0fGdiK /a1mam5r6kMOQEqAWysdGDW8wp59u32rXX6d8cTM3jxW4RH56XZttgMPOeoeTs4A7T62 NAahnATlQ1t3NQNhagtajfN05XvHINcknuOyUAVVUeFgYevKin3+T543F7wCnkntzDan sOjg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=P3jOJ9y4m0qNvfGlNMEwsIKM+Ht48cxLl39lUm8RL8s=; fh=q4ZGsMxn//1auMTNoCVQ/bjq93LtG5wPfdVm1lhmKUU=; b=x1sLumXxAj06Cuw1I/WvKSr34b/sxgDwalGEOG7IozJZPeSkq55XnBkx0IQRYsi2dU ALaKuIyUxyCeY+HT5Orqv0d5vxjf/ak0Fc4e4/Pr1Y2AK3qUhxI0xuBYbw2ieN2i2H5j g3DOMw1LL+ulxAVGBYQPs0yIVxnz8zVQId02JQf0AvGAekJ2VwSoUOdvC2eYyA7lq/7u wnGf8zDdIgR6VjJ/3dil5kQ1NUtEY9p1CKb67BF5F4iIZIZnsI9QXLa5f09fudXM+qOD v3Bczo857nkPtzVe1IVQ8qnrKcSIqMMH/foYltLafF5DBacm/mgLBFpe0+55urixihnp 6LQw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@semihalf.com header.s=google header.b=QaNSoEp2; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=semihalf.com Return-Path: Received: from howler.vger.email (howler.vger.email. [2620:137:e000::3:4]) by mx.google.com with ESMTPS id ck13-20020a056a00328d00b0068a590d8043si1834170pfb.375.2023.10.05.10.53.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 05 Oct 2023 10:53:02 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) client-ip=2620:137:e000::3:4; Authentication-Results: mx.google.com; dkim=pass header.i=@semihalf.com header.s=google header.b=QaNSoEp2; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=semihalf.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by howler.vger.email (Postfix) with ESMTP id 22D9085F66AB; Thu, 5 Oct 2023 10:53:01 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230372AbjJERwy (ORCPT + 99 others); Thu, 5 Oct 2023 13:52:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58378 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231673AbjJERwq (ORCPT ); Thu, 5 Oct 2023 13:52:46 -0400 Received: from mail-ed1-x52b.google.com (mail-ed1-x52b.google.com [IPv6:2a00:1450:4864:20::52b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BEB195585 for ; Thu, 5 Oct 2023 10:14:37 -0700 (PDT) Received: by mail-ed1-x52b.google.com with SMTP id 4fb4d7f45d1cf-523100882f2so2050255a12.2 for ; Thu, 05 Oct 2023 10:14:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=semihalf.com; s=google; t=1696526076; x=1697130876; darn=vger.kernel.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=P3jOJ9y4m0qNvfGlNMEwsIKM+Ht48cxLl39lUm8RL8s=; b=QaNSoEp2rACavVX9r/B2SzhumdWsNADP8WTOrOg5CZk7OYw2RrLagzPqBcRD4eHwNu PxPO/R0I3AGFcsq7IIhMTEzmcL0K8/GMtc/gtr0g5XGa8djxCD8e75LSQTdUorg7p4Y2 yjpb9x496FdWlByeguJZP3mLbnAZFcQv3o+1D8G42/vMipfEfMi4WFyaeyd5dSKPMgDN /6NSqOZZO5pp3fVwFidwbHpGYuc6eVUjv7e0aUaOhaUsJUBfiDTihD1PSXBWEoRkx8+b bXUJRl1Ro092Cq5dWm7PBhIpwZBTWtzaR+P84n+h+EuiIkKIhCYkgP+LltdtAtwmLFnR Qv1A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1696526076; x=1697130876; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=P3jOJ9y4m0qNvfGlNMEwsIKM+Ht48cxLl39lUm8RL8s=; b=VcPXu/U20cZ1Lse66kc870+ivQxGJrc8PXS6T+aY01QMvIgnO+fOrRF8QuZpHkqUtp W0Q1fapLEorknKT3DRdc0JBczkYPVkYKIaEaVEOH/CwFa9m1FDJ8eUR1cF/1cwb9yD7P pMM4X9bCTEX9d+9AmWMz8uUpoa9e/YZnvFTomlxBjf4SkGy9QM+F77okqCWMEQrzVIwv SpFEzhCUXQEjuuSnb3CjLyjB9PIlXcrAJfq4e+UOvehZQx364/Eg8JL3BIrLMriPzqof FUdvr2ORIAl7L4b/iuDZKqwjVVoUl9IsklT1kkLoCWtUY+7swaz5WpI9ylUv9Vd0L60H 2gdg== X-Gm-Message-State: AOJu0Yxm3LjIwWX4k+7tHluR954A5cs6WGijKdc6CtB1aS9Vez0rQRTg xQqya1eFWltGmv5wb5BE/UxbNrVs64L24vMszV6/ X-Received: by 2002:aa7:dc0f:0:b0:52c:b469:bafd with SMTP id b15-20020aa7dc0f000000b0052cb469bafdmr5143303edu.41.1696526076018; Thu, 05 Oct 2023 10:14:36 -0700 (PDT) MIME-Version: 1.0 References: <20230915154856.1896062-1-lb@semihalf.com> <20231003155810.6df9de16@gandalf.local.home> In-Reply-To: From: =?UTF-8?Q?=C5=81ukasz_Bartosik?= Date: Thu, 5 Oct 2023 19:14:24 +0200 Message-ID: Subject: Re: [PATCH v1] dynamic_debug: add support for logs destination To: jim.cromie@gmail.com Cc: Steven Rostedt , Jason Baron , Andrew Morton , Kees Cook , Douglas Anderson , Guenter Roeck , Yaniv Tzoreff , Benson Leung , linux-kernel@vger.kernel.org, upstream@semihalf.com, Vincent Whitchurch Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (howler.vger.email [0.0.0.0]); Thu, 05 Oct 2023 10:53:01 -0700 (PDT) Jim, Just one more thought. If you review my patch then we could move into discussing the details. Thanks, Lukasz =C5=9Br., 4 pa=C5=BA 2023 o 12:55 =C5=81ukasz Bartosik na= pisa=C5=82(a): > > wt., 3 pa=C5=BA 2023 o 22:54 napisa=C5=82(a): > > > > On Tue, Oct 3, 2023 at 1:57=E2=80=AFPM Steven Rostedt wrote: > > > > > > On Mon, 2 Oct 2023 14:49:20 -0600 > > > jim.cromie@gmail.com wrote: > > > > > > > hi Lukasz, > > > > > > > > sorry my kernel-time has been in my own trees. > > > > > > > > What I dont understand is why +T is insufficient. > > > > > > We would like to be able to separate debug logs from different > subsystem (e.g. thunderbolt and usbcore). > With +T it is not possible because all debug logs will land in the same b= ucket. > > > > > IIUC, tracefs is intended for production use. > > > > thats why each event can be enabled / disabled > > > > - to select and minimize whats traced, and not impact the system > > > > > > > > and +T can forward all pr_debugs to trace, > > > > (by 1-few trace events defined similarly to others) > > > > or very few, giving yet another selection mechanism > > > > to choose or eliminate specific pr-debugs and reduce traffic to > > > > interesting stuff. > > > > > > > > Once your debug is in the trace-buf, > > > > shouldnt user-space be deciding what to do with it ? > > > > a smart daemon could leverage tracefs to good effect. > > > > > > Yes, a daemon could separate the debug logs but IMHO it is much > easier to separate logs by sending them directly from a given subsystem > to a separate trace instance. My proposal allows to configure different > trace instance as destination for each callsite. > > > > > IMO the main value of +T is that it allows feeding existing pr_debu= gs > > > > into the place where other trace-data is already integrated and man= aged. > > > > > > > > At this point, I dont see any extra destination handling as prudent= . > > > > > > > > > > > > > I'm fine with either approach. I kind of like the creation of the ins= tance, > > > as that allows the user to keep this debug separate from other tracin= g > > > going on. We are starting to have multiple applications using the tra= cing > > > buffer (although most are using instances, which is why I'm trying to= make > > > them lighter weight with the eventfs code). > > > > > > -- Steve > > > > > Steve, thanks for commenting from the trace perspective. > > > > > > > Ok Im starting to grasp that multiple instances are good > > (and wondering how I didnt notice) > > > > What doesnt thrill me is the new _ddebug field, it enlarges the footpri= nt. > > > > Yes it increases _ddebug structure by a pointer size. > > > can you make it go away ? > > I implemented my proposal with flexibility in mind so that if someone > would like to add > another destination in the future it should be easy to do. I > understand that adding a pointer > to the _ddebug structure increases footprint size that's why I also > added CONFIG_DYNAMIC_DEBUG_DST > kernel configuration option in order to enable/disable this functionality= . > > > I have some thoughts .. > > Please share your thoughts. I'm sure we can come to an agreement how > to incorporate both +T and my proposal. > > Thanks, > Lukasz