Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp1857580yba; Sun, 5 May 2019 16:03:53 -0700 (PDT) X-Google-Smtp-Source: APXvYqxCWoC0iP0IkTqj/+A+vfyEx9vD22FaGSMNSGf550BryqkjC9dOQ6oo5zG2hSJWJawwyQoE X-Received: by 2002:a17:902:22:: with SMTP id 31mr13368674pla.15.1557097433768; Sun, 05 May 2019 16:03:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1557097433; cv=none; d=google.com; s=arc-20160816; b=VKz6/EVYeLCshY2Ymgn+E+h0pxCe9uoLIIP4l6KdDf4jzMbxgZV9M0hmFdqkbdoEt0 78xK6DhKEPp8hdW2MJhqOuyC5zkVyP7t4YdrIfuy3AahSqFmLbhE+gg0YzYy3Is3EOoU VcQIBPS2JtXCVLXs74pZYilIjztq9fYpA40/cWJOCJc0vV74Zwz61JT4gbN7G2RrqPXv tGft5RC44tahXmaXEqG8so5NzUEMi0yvbU+Z2At1G5CNRJyktPivEOyl/L6637tMXMGI v8m57XgOc9wigQX4U7jznMaL3GMNv3oIYmRQ9tw/yTfsVE2vBYKYLfbWCSyb33G4v7gF BNMw== 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=SB5dPpHrqbQeESt+RAqKqUxu4xOiefuo+HyS/vaPRG0=; b=ILpIzX5o1tjtOSoJPc1BbOVbLNy82rWwhLM33gn++Zj8QO3rlRrB3ecrJOp73tluvd Ue4CHu633LZYgZr67GZMpnhtqF4rkLNirhta3+ZKny1ae9w0dp4TEcNHFnISSVNPTbBM O91rK6rJI/rp0nus+347Gv23TGF9ZuOew56VxsFdpsQGU5YlD7CEUKIcimejhCjBvB54 8qpVJawQCc3i8GmnDkDUkVjqMMCCkfLxhxKpnOL/AjJsA4IVJpJfIC20wWO7AmyzS/0+ MQk0b5joJcwaQXm8UTgHQbCMJea/oOUB6yc2L7Sn/cVDInt/AFeSntAIwxj0h7WVvdLd hA1Q== 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 k62si3121895pgd.502.2019.05.05.16.03.38; Sun, 05 May 2019 16:03:53 -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 S1727997AbfEEXBh (ORCPT + 99 others); Sun, 5 May 2019 19:01:37 -0400 Received: from mail.kernel.org ([198.145.29.99]:40072 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727615AbfEEXBh (ORCPT ); Sun, 5 May 2019 19:01:37 -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 5880E20675; Sun, 5 May 2019 23:01:36 +0000 (UTC) Date: Sun, 5 May 2019 19:01:33 -0400 From: Steven Rostedt To: Viktor Rosendahl Cc: Joel Fernandes , Ingo Molnar , linux-kernel@vger.kernel.org Subject: Re: [PATCH v2 1/4] ftrace: Implement fs notification for preempt/irqsoff tracers Message-ID: <20190505190133.49b5ea46@oasis.local.home> In-Reply-To: <20190505223915.4569-1-viktor.rosendahl@gmail.com> References: <20190504164710.GA55790@google.com> <20190505223915.4569-1-viktor.rosendahl@gmail.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 Mon, 6 May 2019 00:39:15 +0200 Viktor Rosendahl wrote: > Can you explain more precisely what you agree with? > > The general idea of being able to trace bursts of latencies? One thing I have an issue with the current approach is the use of the trace file for this. > > Or the slightly more specific idea of notifying user space when > /sys/kernel/debug/tracing/trace has new data, and let user space do the rest? > > > 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" > > > > I am not quite sure what kind of solution you are after here. Could you be more > specific? > > I think that it would be weird if we used trace_pipe to send a message with > the meaning "new data is available in the trace file". To me this would seem > like (re)inventing a special purpose alternative to inotify. > > Another option would be to allow the user to consume the the latency traces > directly from trace_pipe, without using the trace file. This would make sense > to me and would indeed be a much better solution. If somebody is able to make > such an implementation I am all for it. > > However, I do not know how to do this. I believe that it would lead towards a > significant rewrite of the latency tracers, probably also how the ftrace > buffering works. > Hmm, what about adding a notifier to tracing_max_latency instead? And do it not as a config option, but have it always enabled. It would send a notification when it changes, and that only happens when there's a new max latency. Would that work for you? -- Steve