From: Greg KH <gregkh@linuxfoundation.org>
To: li.hao40@zte.com.cn
Cc: linuxppc-dev@lists.ozlabs.org, jirislaby@kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] tty: hvc: wakeup hvc console immediately when needed
Date: Thu, 11 Apr 2024 16:03:00 +0200 [thread overview]
Message-ID: <2024041151-crewmate-entail-62a5@gregkh> (raw)
In-Reply-To: <20240411215017604oDcKsSipiLnfwd2SzAnsj@zte.com.cn>
On Thu, Apr 11, 2024 at 09:50:17PM +0800, li.hao40@zte.com.cn wrote:
> From: Li Hao <li.hao40@zte.com.cn>
>
> Cancel the do_wakeup flag in hvc_struct, and change it to immediately
> wake up tty when hp->n_outbuf is 0 in hvc_push().
>
> When we receive a key input character, the interrupt handling function
> hvc_handle_interrupt() will be executed, and the echo thread
> flush_to_ldisc() will be added to the queue.
>
> If the user is currently using tcsetattr(), a hang may occur. tcsetattr()
> enters kernel and waits for hp->n_outbuf to become 0 via
> tty_wait_until_sent(). If the echo thread finishes executing before
> reaching tty_wait_until_sent (for example, put_chars() takes too long),
> it will cause while meeting the wakeup condition (hp->do_wakeup = 1),
> tty_wait_until_sent() cannot be woken up (missed the tty_wakeup() of
> this round's tty_poll). Unless the next key input character comes,
> hvc_poll will be executed, and tty_wakeup() will be performed through
> the do_wakeup flag.
>
> Signed-off-by: Li Hao
Did checkpatch say this was ok?
WARNING: multiple messages have this Message-ID (diff)
From: Greg KH <gregkh@linuxfoundation.org>
To: li.hao40@zte.com.cn
Cc: jirislaby@kernel.org, linuxppc-dev@lists.ozlabs.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] tty: hvc: wakeup hvc console immediately when needed
Date: Thu, 11 Apr 2024 16:03:00 +0200 [thread overview]
Message-ID: <2024041151-crewmate-entail-62a5@gregkh> (raw)
In-Reply-To: <20240411215017604oDcKsSipiLnfwd2SzAnsj@zte.com.cn>
On Thu, Apr 11, 2024 at 09:50:17PM +0800, li.hao40@zte.com.cn wrote:
> From: Li Hao <li.hao40@zte.com.cn>
>
> Cancel the do_wakeup flag in hvc_struct, and change it to immediately
> wake up tty when hp->n_outbuf is 0 in hvc_push().
>
> When we receive a key input character, the interrupt handling function
> hvc_handle_interrupt() will be executed, and the echo thread
> flush_to_ldisc() will be added to the queue.
>
> If the user is currently using tcsetattr(), a hang may occur. tcsetattr()
> enters kernel and waits for hp->n_outbuf to become 0 via
> tty_wait_until_sent(). If the echo thread finishes executing before
> reaching tty_wait_until_sent (for example, put_chars() takes too long),
> it will cause while meeting the wakeup condition (hp->do_wakeup = 1),
> tty_wait_until_sent() cannot be woken up (missed the tty_wakeup() of
> this round's tty_poll). Unless the next key input character comes,
> hvc_poll will be executed, and tty_wakeup() will be performed through
> the do_wakeup flag.
>
> Signed-off-by: Li Hao
Did checkpatch say this was ok?
next prev parent reply other threads:[~2024-04-11 14:03 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-11 13:50 [PATCH] tty: hvc: wakeup hvc console immediately when needed li.hao40
2024-04-11 13:50 ` li.hao40
2024-04-11 14:03 ` Greg KH [this message]
2024-04-11 14:03 ` Greg KH
2024-04-12 3:25 ` li.hao40
2024-04-12 3:25 ` li.hao40
-- strict thread matches above, loose matches on Subject: below --
2024-04-12 3:38 li.hao40
2024-04-12 3:38 ` li.hao40
2024-04-12 5:10 ` Greg KH
2024-04-12 5:10 ` Greg KH
2024-04-12 6:51 ` Jiri Slaby
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=2024041151-crewmate-entail-62a5@gregkh \
--to=gregkh@linuxfoundation.org \
--cc=jirislaby@kernel.org \
--cc=li.hao40@zte.com.cn \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
/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.