Re: [RFC PATCH 3/7] drivers/tty/serial/serial_core: ratelimit uart_wait_until_sent
From: jim . cromie
Date: Fri Mar 06 2026 - 09:15:13 EST
On Thu, Mar 5, 2026 at 11:32 PM Jiri Slaby <jirislaby@xxxxxxxxxx> wrote:
>
> On 06. 03. 26, 2:50, Jim Cromie wrote:
> > Ratelimiting these pr_debug()s can reduce the console flood during
> > bulk dynamic-debug activation, in environments where a serial console
> > is used.
> >
> > Signed-off-by: Jim Cromie <jim.cromie@xxxxxxxxx>
> > ---
> > drivers/tty/serial/serial_core.c | 4 ++--
> > 1 file changed, 2 insertions(+), 2 deletions(-)
> >
> > diff --git a/drivers/tty/serial/serial_core.c b/drivers/tty/serial/serial_core.c
> > index 487756947a96..6db465619c70 100644
> > --- a/drivers/tty/serial/serial_core.c
> > +++ b/drivers/tty/serial/serial_core.c
> > @@ -1790,8 +1790,8 @@ static void uart_wait_until_sent(struct tty_struct *tty, int timeout)
> >
> > expire = jiffies + timeout;
> >
> > - pr_debug("uart_wait_until_sent(%u), jiffies=%lu, expire=%lu...\n",
> > - port->line, jiffies, expire);
> > + pr_debug_ratelimited("waiting on (%u) jiffies=%lu, expire=%lu...\n",
> > + port->line, jiffies, expire);
>
> The changed message does not make any sense.
>
Ackn. Given the narrow rate-limiting purpose,
I should have ignored the checkpatch warning
and kept the message as is.
In any case, my test setup didnt actually use serio,
and didnt get flooded by it, so I dont know that this
single change would be enough to fix it.
I withdraw this particular patch.
>
> --
> js
> suse labs