From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.2 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_2 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 02A2AC4332B for ; Sun, 22 Mar 2020 18:08:00 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id CB81C20736 for ; Sun, 22 Mar 2020 18:07:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726137AbgCVSH7 (ORCPT ); Sun, 22 Mar 2020 14:07:59 -0400 Received: from mail.kernel.org ([198.145.29.99]:42642 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725881AbgCVSH7 (ORCPT ); Sun, 22 Mar 2020 14:07:59 -0400 Received: from gandalf.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 6F61E2072E; Sun, 22 Mar 2020 18:07:57 +0000 (UTC) Date: Sun, 22 Mar 2020 14:07:56 -0400 From: Steven Rostedt To: David Laight Cc: "linux-kernel@vger.kernel.org" , Ingo Molnar , Andrew Morton , Peter Zijlstra , Masami Hiramatsu , Alexei Starovoitov , Peter Wu , Jonathan Corbet , Tom Zanussi , Shuah Khan , bpf Subject: Re: [PATCH 00/12 v2] ring-buffer/tracing: Remove disabling of ring buffer while reading trace file Message-ID: <20200322140756.7257b867@gandalf.local.home> In-Reply-To: <2a7f96545945457cade216aa3c736bcc@AcuMS.aculab.com> References: <20200319232219.446480829@goodmis.org> <2a7f96545945457cade216aa3c736bcc@AcuMS.aculab.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: bpf-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: bpf@vger.kernel.org On Sat, 21 Mar 2020 19:13:51 +0000 David Laight wrote: > From: Steven Rostedt > > Sent: 19 March 2020 23:22 > ... > > > > This patch series attempts to satisfy that request, by creating a > > temporary buffer in each of the per cpu iterators to place the > > read event into, such that it can be passed to users without worrying > > about a writer to corrupt the event while it was being written out. > > It also uses the fact that the ring buffer is broken up into pages, > > where each page has its own timestamp that gets updated when a > > writer crosses over to it. By copying it to the temp buffer, and > > doing a "before and after" test of the time stamp with memory barriers, > > can allow the events to be saved. > > Does this mean the you will no longer be able to look at a snapshot > of the trace by running 'less trace' (and typically going to the end > to get info for all cpus). If there's a use case for this, it will be trivial to add an option to bring back the old behavior. If you want that, I can do that, and even add a config that makes it the default. > > A lot of the time trace is being written far too fast for it to make > any sense to try to read it continuously. > > Also, if BPF start using ftrace, no one will be able to use it for > 'normal debugging' on such systems. I believe its used for debugging bpf, not for normal tracing. BPF only uses this when it has their trace_printk() using it. Which gives that nasty "THIS IS A DEBUG KERNEL" message ;-) Thus, I don't think you need to worry about bpf having this in production. -- Steve