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=-5.3 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, 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 4EB66C433DB for ; Fri, 15 Jan 2021 16:52:46 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 93DFC23136 for ; Fri, 15 Jan 2021 16:52:45 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 93DFC23136 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=goodmis.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id CDF5B8D0187; Fri, 15 Jan 2021 11:52:44 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id C90558D016A; Fri, 15 Jan 2021 11:52:44 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id BCD948D0187; Fri, 15 Jan 2021 11:52:44 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0090.hostedemail.com [216.40.44.90]) by kanga.kvack.org (Postfix) with ESMTP id A7D188D016A for ; Fri, 15 Jan 2021 11:52:44 -0500 (EST) Received: from smtpin30.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id 6BA52485C for ; Fri, 15 Jan 2021 16:52:44 +0000 (UTC) X-FDA: 77708603448.30.unit46_090b7eb27530 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin30.hostedemail.com (Postfix) with ESMTP id 4723F180DEACC for ; Fri, 15 Jan 2021 16:52:44 +0000 (UTC) X-HE-Tag: unit46_090b7eb27530 X-Filterd-Recvd-Size: 3329 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by imf13.hostedemail.com (Postfix) with ESMTP for ; Fri, 15 Jan 2021 16:52:43 +0000 (UTC) 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 9D245222B3; Fri, 15 Jan 2021 16:52:41 +0000 (UTC) Date: Fri, 15 Jan 2021 11:52:39 -0500 From: Steven Rostedt To: Alexander Potapenko Cc: Greg KH , LKML , Andrew Morton , Andrey Konovalov , Dmitriy Vyukov , Ingo Molnar , Marco Elver , Petr Mladek , Sergey Senozhatsky , Linux Memory Management List Subject: Re: [PATCH v2 3/5] docs: ABI: add /sys/kernel/error_report/ documentation Message-ID: <20210115115239.1f3693ac@gandalf.local.home> In-Reply-To: References: <20210115130336.2520663-1-glider@google.com> <20210115130336.2520663-4-glider@google.com> X-Mailer: Claws Mail 3.17.8 (GTK+ 2.24.33; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Fri, 15 Jan 2021 16:26:21 +0100 Alexander Potapenko wrote: > > please put something like this in > > tracefs, as there is no such rules there. Or debugfs, but please, not > > sysfs. > Does tracefs have anything similar to sysfs_notify() or any other way > to implement a poll() handler? > Our main goal is to let users wait on poll(), so that they don't have > to check the file for new contents every now and then. Is it possible > with tracefs or debugfs? Polling should work on tracefs. I hope it does, as I depend on it ;-) And if there's an issue, we can always add more features. > > Also, for our goal debugfs isn't a particularly good fit, as Android > kernels do not enable debugfs. > Not sure about tracefs, they seem to have it, need to check. I believe tracefs is used extensively on Android. > > Do you think it is viable to keep > /sys/kernel/error_report/report_count in sysfs and use it for > notifications, but move last_report somewhere else? > (I'd probably prefer procfs, but it could be tracefs as well, if you > find that better). If you do use tracefs, add it to the top level tracing directory (no need to have instances of it), and rename it to "kernel_warnings", as "error_report" is too close to the existing "error_log" which holds error messages of syntactic errors done by users entering in commands to some of the special files. That is, /sys/kernel/tracing/kernel_warnings/ would be your error_report/ directory you have now. Use the function in kernel/trace/trace.c: tracer_init_tracefs() to add that directory. That's for files in the tracefs directory that will not be duplicated by instances. -- Steve