linux-serial.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Tomasz Moń" <tomasz.mon@camlingroup.com>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: "Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>,
	linux-serial@vger.kernel.org, "Jiri Slaby" <jirislaby@kernel.org>,
	"Fabio Estevam" <festevam@gmail.com>,
	"Sascha Hauer" <s.hauer@pengutronix.de>,
	"NXP Linux Team" <linux-imx@nxp.com>,
	"Pengutronix Kernel Team" <kernel@pengutronix.de>,
	"Shawn Guo" <shawnguo@kernel.org>,
	k.drobinski@camlintechnologies.com
Subject: Re: [PATCH] serial: imx: reduce RX interrupt frequency
Date: Wed, 5 Jan 2022 11:56:25 +0100	[thread overview]
Message-ID: <2a898a30-0d01-603e-f1b3-435f69b71722@camlingroup.com> (raw)
In-Reply-To: <YdV00WYGGd49WYt9@kroah.com>

On 05.01.2022 11:37, Greg Kroah-Hartman wrote:
> On Wed, Jan 05, 2022 at 08:59:09AM +0100, Tomasz Moń wrote:
>> While the increased latency due to this change is undeniable, it is
>> important to note that latency is not everything. There are applications
>> where the latency is crucial, however using Linux for such applications
>> is questionable. Linux is not a Real Time Operating System after all.
> 
> Yes, Linux can be used in real time situtations just fine, look at the
> RT patchset for proof of that.
> 
> So let's not make things any worse for no good reason if at all
> possible.

Avoiding interrupt storm is a good reason for me.

>> Latency is simple to measure and argue based on the reception of single
>> character. That is only a corner case, not fully describing real world.
>> In the real world, it is important to consider the overall performance
>> improvement. It is hard to determine how much does the performance of
>> the system improve thanks to less time spent in interrupt handling.
> 
> If this can't be measured at all, why make this change in the first
> place?

It can be measured, just in general case, it is hard to tell exactly how
much does it help due to the complexity. All the time saved by not
wasting it in interrupt handler can have impact on many parts of the system.

However, there is a use case where it is easy to tell how much does this
change improve performance. In the situation where the interrupt storm
occurs with current mainline kernel (RXTL is set to 1) essentially
freezing everything until the sender stops transmitting, the patched
kernel (with RXTL is set to 8) handles the situation just fine. Change
from completely unresponsive to just fine is easy to notice.

Best Regards,
Tomasz Mon


  reply	other threads:[~2022-01-05 10:56 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-04 10:32 [PATCH] serial: imx: reduce RX interrupt frequency Tomasz Moń
2022-01-04 10:43 ` Ahmad Fatoum
2022-01-04 11:05   ` Tomasz Moń
2022-01-04 10:54 ` Greg Kroah-Hartman
2022-01-04 11:13   ` Tomasz Moń
2022-01-04 11:38     ` Greg Kroah-Hartman
2022-01-04 22:49       ` Uwe Kleine-König
2022-01-05  7:59         ` Tomasz Moń
2022-01-05 10:37           ` Greg Kroah-Hartman
2022-01-05 10:56             ` Tomasz Moń [this message]
2022-01-05 10:57             ` Marc Kleine-Budde
2022-01-06 15:39               ` Sergey Organov
2022-01-05 13:34         ` Sergey Organov
2022-01-06 15:05           ` Uwe Kleine-König
2022-01-10  6:14             ` Tomasz Moń
2022-01-10  8:31               ` Uwe Kleine-König
2022-01-05 13:00   ` Sergey Organov
2022-01-05 13:04     ` Marc Kleine-Budde
2022-01-05 13:37       ` Sergey Organov
2022-01-05 13:40         ` Marc Kleine-Budde
2022-01-05 14:37           ` Sergey Organov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2a898a30-0d01-603e-f1b3-435f69b71722@camlingroup.com \
    --to=tomasz.mon@camlingroup.com \
    --cc=festevam@gmail.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=jirislaby@kernel.org \
    --cc=k.drobinski@camlintechnologies.com \
    --cc=kernel@pengutronix.de \
    --cc=linux-imx@nxp.com \
    --cc=linux-serial@vger.kernel.org \
    --cc=s.hauer@pengutronix.de \
    --cc=shawnguo@kernel.org \
    --cc=u.kleine-koenig@pengutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).