Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756226AbbFVIUV (ORCPT ); Mon, 22 Jun 2015 04:20:21 -0400 Received: from mout.gmx.net ([212.227.15.19]:55981 "EHLO mout.gmx.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756039AbbFVIUS (ORCPT ); Mon, 22 Jun 2015 04:20:18 -0400 Message-ID: <5587C53A.9080308@gmx.at> Date: Mon, 22 Jun 2015 10:20:10 +0200 From: Manfred Schlaegl User-Agent: Mozilla/5.0 (X11; Linux i686; rv:31.0) Gecko/20100101 Icedove/31.7.0 MIME-Version: 1.0 To: Alexander Stein CC: Greg Kroah-Hartman , Jiri Slaby , linux-serial@vger.kernel.org, linux-kernel@vger.kernel.org, Manfred Schlaegl Subject: Re: [PATCH] serial: imx: reduce irq-latency after rx overflow References: <5585A220.5000405@gmx.at> <4275820.CIOTxUBfmF@ws-stein> In-Reply-To: <4275820.CIOTxUBfmF@ws-stein> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="QtdmuMDllheEF7UCFhMI9tjvDH9gv07Ik" X-Provags-ID: V03:K0:MXdEbS161QZink1WPNSU06AyjZJ949KTvLwU2BfYUbVFaddeX09 kh9BQ2l2pwYD9nfWw0D/wFaipsb7bXtqkJqu+IAR06wUpDFir4PUhnYLbuwKbFrhliBbRd/ ATwuplankXCNpRruoWTN/NzbPrnUh0zS1YskvKYZDhBuPViigGyofqV7uv9p87JGBzQtAUS I9fn8VyVU9HvERpluPcLA== X-UI-Out-Filterresults: notjunk:1;V01:K0:tdCs/Kpwcns=:+3PdLabf5+d8QCK/otQzOM CKgRi5d9PY80BGwcc21BYnW8LHUltdxCkk/QQK+3sF03UcUkI/iOUIbcAbJOWHZmozMcY0/mC KSJZtq5cadOIM+47mj4Vn7q7g/QHtp8gngDJc2jXB1dU3vVp2rPoT/YvsXR2ZEL5IJjAeycw7 12FqNE7MQfvfS5TqR/hsgLaSJ4DOZvlNMTgLPXYV4qY+jMVxlA0/bZ+CKZZ79MuMePGT5owTf IEtO2VVAfrs4+U9MewTnByRKINNjRaPQNhBoAE3tGFNtpMPuzZDeabZBRbdk78tq5dZh83DwE BtKz+OXZIf4nt6cBc18GchZQBxaZhmh5T/A6N3Y6D5HOA2JGhiYQiSEFLAhtVMHvsfnFrPIqq 5Eu9wSKOwyuP2aaLyMIw3jt0AXBxylGuemvr1F1eG6dJZ8RKgyiyY7IFS2f6MFFDqHAu2yIjN 5dOFmjCZ7ugk4qMoa/PYTwfpy+Z4jZ0GVjuBzlfXMPa7tGdNPVffetMM3CqcRuCOnadVwU/vs PKiCBU3N/kzMIr2yAgzDaXO2HuXf0Lc+xX0m8L7Mu+kHEPMgnfr6J90okVIQIK+B0nOWv/Lwm UcxWWTwyjiQeB/vb77jb4pN487sG4OjorcJouWNPfAqv88W9DA7jjSPUx0FbeLXbFOwONMUNC AV3jXoIRYlESg64+qd+4wqD19cn9PdmO7wy9w2XDbqkYLgA== Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 3185 Lines: 76 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --QtdmuMDllheEF7UCFhMI9tjvDH9gv07Ik Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable On 2015-06-22 08:48, Alexander Stein wrote: > Am Samstag, 20. Juni 2015, 19:25:52 schrieb Manfred Schlaegl: >> To prevent problems with interrupt latency, and due to the fact, that >> the error will be counted anyway (icount.overrun), the dev_err is simp= ly >> removed. >> >> Background: >> If an rx-fifo overflow occurs a dev_err message was called in interrup= t >> context. Since dev_err messages are written to console in a synchronou= s way >> (unbuffered), and console may be a serial terminal, this leads to a >> highly increased interrupt-latency (several milliseconds). >> As a result of the high latency more rx-fifo overflows will happen, an= d >> therefore a feedback loop of errors is created. >=20 > I understand your rationale but removing this error message from kernel= log removes the possibility to detect serial overruns by simply check th= e kernel log or output on kernel console. AFAICS you have to use TIOCGICO= UNT to get the error counters. > How about introducing a rate limit for this kernel message? >=20 Hello! I understand your argument, but: 1. In my personal opinion kernel error messages should only be used on i= nternal errors (missing resources, asserts, ...) and in cases where no ot= her way is (yet) available to report errors (by counters, return values, = =2E..). Lost RX bytes on uarts seem more like a communication error and s= hould be silently handled by higher layers using error counters, or proto= col internal mechanisms. 2. I have found no other serial driver (except serial-tegra and imx) tha= t reports this kind of errors using kernel messages. 3. Error counters for serial interfaces can also be retrieved from users= pace by using procfs -> implemented in serial_core; e.g. /proc/tty/driver= /IMX-uart. best regards, manfred --QtdmuMDllheEF7UCFhMI9tjvDH9gv07Ik Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (GNU/Linux) iQIcBAEBAgAGBQJVh8U6AAoJEGS1eKPM78WhtDgP/RfsQ4B4AV69P2zl8JzRR9sA e+J5ByC0dkCes4X5AmVvNeij9v5a5HP81XePmpRTStv8wn8/ebbZZZ3IUTsKqKDE qZlaBq6mFz6D/lDfqGb5pZSgDWlWnSxY4IKWD6JE9fe+exLkkOMWQsqSP0T3TFmL n4cJ719Be65kYzIwKT7GTyhf7G24/HC/ol/FNkCDiEUb1Hy3CS+FuTWYZZqfZPP9 rznStCVffU2vSaNuxEyt5Tubv2Q14OQLvDjzMo1HmZ5HDst/7S6Dsva0BZgy/7mu foY7WAaEtVzSIGpGt2AJXRGHLgeiXoerip24mO+YAEb/GitonwR0YkMpMa9UPeBG PML6q3zB07pK3bfNNM51jiYkXV4TYIWa7Vnvvq+Gu29922lP/jqpYE0F7a2kg4wN gMHs1m3Y4WiOTqXX7BMo6/yjI1PE8LaQLU6zlSsEQhYk5YXq6uANtrl3ucSd6r9G kHtwIMW8WrhqF2HtjN7AnOMJJjTbWHRCt/3r3V3amHAK2MF6UjxatTU3OeMi1li4 mPxgSFLdbrLUclzo4wRXYV3E4Dy+CBhhkJHBBsoSIfR1JxjFCuGt9As0TeayyBUR qVHyTmH7PBCogsVB8N6IPhqm15DDbuDg5xQMSQTNQaOF42Nmtx/M1C0R3UhEaM1M cxJNiyr4xTn3LSuEfKsI =MFoU -----END PGP SIGNATURE----- --QtdmuMDllheEF7UCFhMI9tjvDH9gv07Ik-- -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in Please read the FAQ at http://www.tux.org/lkml/