Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp119348pxb; Fri, 15 Jan 2021 08:54:35 -0800 (PST) X-Google-Smtp-Source: ABdhPJwOLRTp9+UqkXQ3uUfQKoPEes80gHhOXw53Hp3cDb4u24li3+UBHTR154e5NOEZ9R2wNQbF X-Received: by 2002:a17:906:f0d0:: with SMTP id dk16mr9408867ejb.144.1610729675383; Fri, 15 Jan 2021 08:54:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1610729675; cv=none; d=google.com; s=arc-20160816; b=vhdtGhCAAyVtBJgCcAOfwK/aUfu2Rws+vimxJC8KQv+u+E7rpCgsL4rvuEzgZ6QRFu YNgYH8CUVjRDe1d9b2M1zPuGeXWPnoc4ftvvCEh9W6+FdJgcM/Fksk+WfbgFzpvgjQ26 YbIcZWZ9Uy+N9BjeYaH1viKHWaQEJIAALVDiVr3W1kUF0f0M1Vm4rwWTrKhzmYke6UOO hB1P33KeeTXGdXyL/tzW7LF2kUewuUGCQ0XinpznugxRjlNg/0E4kUk2ZOW0nKpbKFoz 1H4S2Z22mwHJo+ub11Jp4vqf9sPwjRa9P0Gl/RGful5YNCqyfr+0AKdJ3kIYwiGornnk UCbw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date; bh=V0d9CTKlgv9A084ZtzGIFZ261ORp+wqgAXRFCKcmQkY=; b=LbtzLPh2Gs1gafwU+coTrJVfYGx5HZcAHM+a3UXLac8rV4nXilaZhkO7oxrwsSnjRF /XDdGEN3OdEO2E+7JsGgrabcGHX/7PDO6K/2Pk0PWXcUGnt0afwVTlepZ9pO7qpOh0wF dcOe64GqQ6Vyhq2nB4Gp7UCJnA779qtxNFa8VlaNNF23wsC2SsADGjeyANLVpBIW+g3e AEfwfFKJFVQBr0qgM0pHSmHd07fFKF3wewTrd46Qrqbr/0umaD/SXtZmRbGGOoQYSCol 6soLthjBNpacoHtSm0/ORZYj0rmBBWSocYWJLpEDcjdf0sWxZl4X+kvzRJjR5gNxpkog Dmbg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id a27si3992670ejc.18.2021.01.15.08.54.11; Fri, 15 Jan 2021 08:54:35 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727217AbhAOQxY (ORCPT + 99 others); Fri, 15 Jan 2021 11:53:24 -0500 Received: from mail.kernel.org ([198.145.29.99]:42266 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726970AbhAOQxX (ORCPT ); Fri, 15 Jan 2021 11:53:23 -0500 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 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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