From: Pekka Paalanen Subject: Re: [PATCH] drm: Funnel drm logs to tracepoints Date: Wed, 16 Oct 2019 16:05:57 +0300 Message-ID: <20191016160557.73b634c9@eldfell.localdomain> References: <20191010204823.195540-1-sean@poorly.run> <242462f0-ac8d-ab8a-e567-74678da3f68f@suse.de> <20191015191156.GW85762@art_vandelay> <20191015200233.GK1208@intel.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0514383816==" Return-path: Received: from mail-lf1-x144.google.com (mail-lf1-x144.google.com [IPv6:2a00:1450:4864:20::144]) by gabe.freedesktop.org (Postfix) with ESMTPS id BDCCC89CBA for ; Wed, 16 Oct 2019 13:06:11 +0000 (UTC) Received: by mail-lf1-x144.google.com with SMTP id u16so4848263lfq.3 for ; Wed, 16 Oct 2019 06:06:11 -0700 (PDT) In-Reply-To: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" To: Daniel Vetter Cc: David Airlie , dri-devel , Sean Paul , Thomas Zimmermann , Sean Paul List-Id: dri-devel@lists.freedesktop.org --===============0514383816== Content-Type: multipart/signed; micalg=pgp-sha256; boundary="Sig_/rpK=L38D3MW=dueU2DLbi6I"; protocol="application/pgp-signature" --Sig_/rpK=L38D3MW=dueU2DLbi6I Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable On Wed, 16 Oct 2019 00:35:39 +0200 Daniel Vetter wrote: > Yeah I don't think tuning the spam level will ever work. What we need > is some external input (most likely from the user clicking the "my > external screen doesn't work" button, or maybe the compositor > realizing something that should work didn't, or some other thing that > indicates trouble), and then retroactively capture all > debug/informational message leading up to doom. >=20 > But without that external "houston we have a problem" input all the > debug spam is really just spam and unwanted. btw even if we don't spam > dmesg if we enable too much we might have simply trouble with all the > printk formatting work we do for nothing. So maybe we need something > like trace_printk which iirc delays the formatting until the stuff > actually gets read from the log buffer. Plus trace_printk might make > it clear enough that it's not stable uapi ... so maybe we do want > trace_printk in the end? >=20 > Just not really looking forward to reimplementing half the tracing > infrastructure just for this ... Hi, a thought about the UAPI: Debugfs is not good because it's not supposed to be touched or even present in production, right? But we want something that will specifically be available in production. So a new file in some fs somewhere it should be, and userspace in production can read it at will to attach to a bug report. Those semantics, "only use this content for attaching into a bug report" should be made very clear in the UAPI. Not just the kernel function names, but in the UAPI that an end user might see. /proc/driver/drm/bug-report-aid or whatever. And that file, while a ring buffer, could be aggressively big, intended to be compressed before sent out with a bug report. Or maybe it comes out as readily compressed. The file name itself would be stable UAPI, the contents not at all. I believe it has to be a ring buffer that is being continuously written also during normal operations, so that we don't have to ask end users to reproduce the issue again just to get some logs. Maybe the issue happens once in a fortnight. The information must be extractable after the fact, without before-hand preparations. Thanks, pq --Sig_/rpK=L38D3MW=dueU2DLbi6I Content-Type: application/pgp-signature Content-Description: OpenPGP digital signature -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEJQjwWQChkWOYOIONI1/ltBGqqqcFAl2nFbUACgkQI1/ltBGq qqfVIhAAkfVHe1ipKTi2v7h6T4kHvAjYuZf3ukL/I6FsCBr6yOe7SqJ+6WZY/mYo X6/OM+1QKFqqhl8p2wBcyP5ESa/lxkCXTskJtQjm5VmZC9W65ImLzxey0xdq5q4p /Vwv5AWLw5qH8Cj26EPdx20Fwk7G0yTkmUzLKEbYw1Tsmrj6YSeXRfaVZzvlzQqU JgR8RaZ5Ii/FiA2NDQRxgmJXpoWVCleR6Q3ui+VsQEpj+vxkhsGi5+G7cOIg2VFW T4oCnafoRiqXrc6+qpWoSZTXKhS8LOUrGyV09p6UvODd7SdmqTnDM9Ur/pNt4xig V93AvvMspzlffdmiv6sE6bmLlGvyrKgAgvF2Wc4VvTWmrIgqNNnVtMf3NVMtDaJp vQ8rygF0SfGsYeFnh9gPx8Re5Kt19LcQwc0J1lVUJ/L3DY72dvUWLUDXntPcd69A spchOKDoONCE/WwfgwmB9/B1BgsZHsbwXMFwlAXLImXFvtDuJpw59s0RBjr32LTZ e447Ik1PBq1cidj52Wt+ZXYSm3iybrR+n0/8rVvQz22IS3CerqOEKC9kQ8SNZrW+ nr/5gZYVvVF3e8vFt6ewUyuxucEnG5NUjaehb+juII5wXOqWGPFrdYMom1KW5XWa JNcSlU/lPqPdPVOJL7IS9mMYz0NVB3aOnLAx2ei7f9hyTJkY3B8= =X/Ng -----END PGP SIGNATURE----- --Sig_/rpK=L38D3MW=dueU2DLbi6I-- --===============0514383816== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KZHJpLWRldmVs IG1haWxpbmcgbGlzdApkcmktZGV2ZWxAbGlzdHMuZnJlZWRlc2t0b3Aub3JnCmh0dHBzOi8vbGlz dHMuZnJlZWRlc2t0b3Aub3JnL21haWxtYW4vbGlzdGluZm8vZHJpLWRldmVs --===============0514383816==--