From: Johan Hovold <johan@kernel.org>
To: Doug Anderson <dianders@chromium.org>
Cc: "Greg Kroah-Hartman" <gregkh@linuxfoundation.org>,
"Jiri Slaby" <jirislaby@kernel.org>,
"Yicong Yang" <yangyicong@hisilicon.com>,
"Tony Lindgren" <tony@atomide.com>,
"Andy Shevchenko" <andriy.shevchenko@linux.intel.com>,
"Johan Hovold" <johan+linaro@kernel.org>,
"John Ogness" <john.ogness@linutronix.de>,
linux-arm-msm@vger.kernel.org,
"Bjorn Andersson" <andersson@kernel.org>,
"Konrad Dybcio" <konrad.dybcio@linaro.org>,
"Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>,
"Stephen Boyd" <swboyd@chromium.org>,
linux-serial@vger.kernel.org, linux-kernel@vger.kernel.org,
"Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>,
"Rob Herring" <robh@kernel.org>
Subject: Re: [PATCH v4 8/8] serial: qcom-geni: Rework TX in FIFO mode to fix hangs/lockups
Date: Wed, 26 Jun 2024 10:20:06 +0200 [thread overview]
Message-ID: <ZnvPNiWWIIsugbhN@hovoldconsulting.com> (raw)
In-Reply-To: <CAD=FV=Ux+ro90xnEEnALiwtjnOk+LT_qaHmE8jS7adWgBPSDbg@mail.gmail.com>
On Tue, Jun 25, 2024 at 07:29:38AM -0700, Doug Anderson wrote:
> On Tue, Jun 25, 2024 at 4:21 AM Johan Hovold <johan@kernel.org> wrote:
> > Right. But with a 16 1-byte word FIFO, we may be able to kick of a
> > really long transfer and just keep it running until it needs to be
> > kicked again (cf. enabling TX). The console code can easily insert
> > characters in the FIFO while the transfer is running (and would only
> > have to wait for 16 characters to drain in the worst case).
> >
> > Effectively, most of the identified issues would just go away, as
> > there's basically never any need to cancel anything except at port
> > shutdown.
>
> Yeah, though you'd still have to make sure that the corner cases
> worked OK. You'll have to pick _some_ sort of fixed transfer size and
> make sure that all the special cases / console / kdb work if they show
> up right at the end of the transfer.
Yes, there are some details like that would need to be worked out.
> I was also a bit curious if there could be power implications with
> leaving an active TX command always in place. Perhaps geni wouldn't be
> able to drop some resources? Do you happen to know?
Hmm, good point. I'll see if I can ask someone with access to docs.
But I guess we can still continue to stop the command on stop_tx() (as
we are considering anyway) to avoid that.
> > I didn't do an in-depth analysis of the slowdown, but I did rerun the
> > tests now and I'm still seeing a 22-24% slowdown on x1e80100 with rc5.
> > This is a new platform so I compared with sc8280xp, which shows similar
> > numbers even if it's slightly faster to begin with:
> >
> > sc8280xp x1e80100
> >
> > rc5 full series 61 s 67 s
> > rc5 last patch reverted 50 s 54 s
> >
> > I have a getty running and cat a 10x dmesg file of 543950 bytes to
> > /dev/ttyMSM0 from an ssh session (just catting in a serial console gives
> > similar numbers).
>
> That's really weird / unexpected. Your hardware should be fancier than
> mine so, if anything, I'd expect it to be faster. Is there something
> causing you really bad interrupt latency or something? ...or is some
> clock misconfigured and "geni" is behaving sub-optimally?
That may be the case. I'm not seeing more interrupts with the last patch
applied, and not more time spent servicing interrupts (based on a quick
look at top), so it may just be geni taking a lot of time to start or
stop commands.
> ...although it wouldn't explain the slowness, I'd at least be a little
> curious if you've confirmed that you're running with a 16-word FIFO
> depth. See the function geni_se_get_tx_fifo_depth() where newer
> hardware can actually have larger FIFO depths.
No, I had confirmed that it is using 16 words (64 bytes).
> Just in case it matters, I'd be curious if you have
> `CONFIG_IRQ_TIME_ACCOUNTING=y`
I do, yes.
> Oh: one last thing to confirm: do you have kernel console output
> disabled for your tests? I've been doing tests with the kernel console
> _not_ enabled over the serial port and just an agetty there. I could
> believe things might be different if the kernel console was sending
> messages over the same port.
Yes, there has been no console output during my tests, and I get similar
results with the console disabled.
Johan
next prev parent reply other threads:[~2024-06-26 8:19 UTC|newest]
Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-10 22:24 [PATCH v4 0/8] serial: qcom-geni: Overhaul TX handling to fix crashes/hangs Douglas Anderson
2024-06-10 22:24 ` [PATCH v4 1/8] soc: qcom: geni-se: Add GP_LENGTH/IRQ_EN_SET/IRQ_EN_CLEAR registers Douglas Anderson
2024-06-10 22:24 ` [PATCH v4 2/8] tty: serial: Add uart_fifo_timeout_ms() Douglas Anderson
2024-06-12 7:38 ` Ilpo Järvinen
2024-06-12 18:45 ` Doug Anderson
2024-06-13 6:56 ` Ilpo Järvinen
2024-06-13 14:02 ` Doug Anderson
2024-06-10 22:24 ` [PATCH v4 3/8] serial: qcom-geni: Fix the timeout in qcom_geni_serial_poll_bit() Douglas Anderson
2024-06-17 18:46 ` Konrad Dybcio
2024-06-10 22:24 ` [PATCH v4 4/8] serial: qcom-geni: Fix arg types for qcom_geni_serial_poll_bit() Douglas Anderson
2024-06-17 18:47 ` Konrad Dybcio
2024-06-10 22:24 ` [PATCH v4 5/8] serial: qcom-geni: Introduce qcom_geni_serial_poll_bitfield() Douglas Anderson
2024-06-17 18:53 ` Konrad Dybcio
2024-06-10 22:24 ` [PATCH v4 6/8] serial: qcom-geni: Just set the watermark level once Douglas Anderson
2024-06-10 22:24 ` [PATCH v4 7/8] serial: qcom-geni: Fix suspend while active UART xfer Douglas Anderson
2024-06-17 19:02 ` Konrad Dybcio
2024-06-24 12:12 ` Johan Hovold
2024-06-24 16:54 ` Johan Hovold
2024-06-24 20:58 ` Doug Anderson
2024-06-25 8:46 ` Johan Hovold
2024-06-10 22:24 ` [PATCH v4 8/8] serial: qcom-geni: Rework TX in FIFO mode to fix hangs/lockups Douglas Anderson
2024-06-17 19:10 ` Konrad Dybcio
2024-06-17 19:37 ` Doug Anderson
2024-06-17 19:54 ` Konrad Dybcio
2024-06-24 12:43 ` Johan Hovold
2024-06-24 21:15 ` Doug Anderson
2024-06-25 11:21 ` Johan Hovold
2024-06-25 14:29 ` Doug Anderson
2024-06-26 8:20 ` Johan Hovold [this message]
2024-06-18 10:19 ` [PATCH v4 0/8] serial: qcom-geni: Overhaul TX handling to fix crashes/hangs Konrad Dybcio
2024-06-19 8:25 ` neil.armstrong
2024-06-19 8:50 ` Johan Hovold
2024-06-20 23:13 ` Nícolas F. R. A. Prado
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=ZnvPNiWWIIsugbhN@hovoldconsulting.com \
--to=johan@kernel.org \
--cc=andersson@kernel.org \
--cc=andriy.shevchenko@linux.intel.com \
--cc=dianders@chromium.org \
--cc=gregkh@linuxfoundation.org \
--cc=ilpo.jarvinen@linux.intel.com \
--cc=jirislaby@kernel.org \
--cc=johan+linaro@kernel.org \
--cc=john.ogness@linutronix.de \
--cc=konrad.dybcio@linaro.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-serial@vger.kernel.org \
--cc=robh@kernel.org \
--cc=swboyd@chromium.org \
--cc=tony@atomide.com \
--cc=u.kleine-koenig@pengutronix.de \
--cc=yangyicong@hisilicon.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.