Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp1733519yba; Sun, 5 May 2019 12:44:48 -0700 (PDT) X-Google-Smtp-Source: APXvYqzE+zAk3QK/meUkHJq5RLEjJNfzmuIcmv6E8U1zBSRS/wcrOCQFEpZ5zktTBnC7TI4Ixxxs X-Received: by 2002:a63:5720:: with SMTP id l32mr27836947pgb.438.1557085488525; Sun, 05 May 2019 12:44:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1557085488; cv=none; d=google.com; s=arc-20160816; b=heRF6NsnccgltFdD6xkDh6SuaQg50+kvVABJQYU9XaBPvmxY34PFH8Tu4pgbtbiQea hJlLs1Boz3cGWRHPMvM0ep7xGEvUOCbe4YDZ+b0a7V+2lZTKSHNTDIBkKtp4S73GVi8+ WWhbFqv8NXG60+tjvDIajmOY+hZDYvWTYJ8fDLfLpoQ0QrP+m266+VJDE+FVcjmrPABC fNYp5vsbeiAdWHGiub+jjk5BPFRXidzVsTEBRNiGjtfXftovp31BskRBLEgSKgeJTzds m/xUG837+SaRBkKsaOeLIpLjj9XqnCe8Buw0XxwOpUvUTKqrz86AKKwqYfafBbqJc3O+ 3x1Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date; bh=zqpeSzBBu3U+JQU8cKzshKOSP/ii/xby4s4R8LyzEKU=; b=IjPIvGR2aOjZOPfK3gRILh4aJ++HGmQRdwNK4Tiq+zpgBsYwaifDAOURApyaSKYaxZ UV0AO2TxrSioV7XvcSZr2EZH4Tpv4MvlW+/vaGAiEyVcrZN45/quWpQ7JfhZuFq7+YIM ipcwnTd0GdeDuafeHZC7SwVmOcJVi0WDZG4m+nJMQdCNo6si9XHRp3etDmcciML49pPX KP3tdUBE7uZXBCu+VSVW4DAGgxjBTW3lpsqiAZbyrZtKgGq8Y+r4dfJ6moIgsnZrMvoy qYA769hoMUaNVdU6TTUnrVEChCOvO3xsqaT5W8K/13Ez2bGIyJTCgb0uEVn6IOb2AJNS Zvfw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u13si11483322pgr.456.2019.05.05.12.44.30; Sun, 05 May 2019 12:44:48 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727806AbfEETng (ORCPT + 99 others); Sun, 5 May 2019 15:43:36 -0400 Received: from mail.kernel.org ([198.145.29.99]:42178 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726636AbfEETnf (ORCPT ); Sun, 5 May 2019 15:43:35 -0400 Received: from oasis.local.home (cpe-66-24-58-225.stny.res.rr.com [66.24.58.225]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id B577F20578; Sun, 5 May 2019 19:43:34 +0000 (UTC) Date: Sun, 5 May 2019 15:43:33 -0400 From: Steven Rostedt To: Joel Fernandes Cc: Viktor Rosendahl , Ingo Molnar , linux-kernel@vger.kernel.org Subject: Re: [PATCH v2 1/4] ftrace: Implement fs notification for preempt/irqsoff tracers Message-ID: <20190505154333.56f3a187@oasis.local.home> In-Reply-To: <20190504164710.GA55790@google.com> References: <20190501203650.29548-1-viktor.rosendahl@gmail.com> <20190501203650.29548-2-viktor.rosendahl@gmail.com> <20190504164710.GA55790@google.com> X-Mailer: Claws Mail 3.17.3 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, 4 May 2019 12:47:10 -0400 Joel Fernandes wrote: > I agree with the general idea, but I don't really like how it is done in the > patch. +1 > > We do have a notification mechanism already in the form of trace_pipe. Can we > not improve that in some way to be notified of a new trace data? In theory, > the trace_pipe does fit into the description in the documentation: "Reads > from this file will block until new data is retrieved" > > More comment below: > > > > + config PREEMPTIRQ_FSNOTIFY > > + bool "Generate fsnotify events for the latency tracers" > > + default n > > + depends on (IRQSOFF_TRACER || PREEMPT_TRACER) && FSNOTIFY > > + help > > + This option will enable the generation of fsnotify events for the > > + trace file. This makes it possible for userspace to be notified about > > + modification of /sys/kernel/debug/tracing/trace through the inotify > > + interface. > > Does this have to be a CONFIG option? If prefer if the code automatically > does the notification and it is always enabled. I don't see any drawbacks of > that. I mentioned that anything it needs to be an option. > > +#ifdef CONFIG_PREEMPTIRQ_FSNOTIFY > > + > > +static void trace_notify_workfn(struct work_struct *work) > [snip] > > I prefer if this facility is available to other tracers as well such as > the wakeup tracer which is similar in output (check > Documentation/trace/ftrace.txt). I believe this should be a generic trace > facility, and not tracer specific. For what it's worth, I agree with everything Joel just stated. Thanks, -- Steve