[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20240412112547433nW9Ip0D2cBmiCc-YaWRru@zte.com.cn>
Date: Fri, 12 Apr 2024 11:25:47 +0800 (CST)
From: <li.hao40@....com.cn>
To: <gregkh@...uxfoundation.org>
Cc: <jirislaby@...nel.org>, <linuxppc-dev@...ts.ozlabs.org>,
<linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] tty: hvc: wakeup hvc console immediately when needed
sorry,the patch seems to be corrupt,I will resubmit the patch
------------------Original------------------
From: gregkh <gregkh@...uxfoundation.org>
To: li hao10307857;
Cc: jirislaby <jirislaby@...nel.org>;linuxppc-dev <linuxppc-dev@...ts.ozlabs.org>;linux-kernel <linux-kernel@...r.kernel.org>;
Date: 2024/04/11 22:03
Subject: Re: [PATCH] tty: hvc: wakeup hvc console immediately when needed
On Thu, Apr 11, 2024 at 09:50:17PM +0800, li.hao40@....com.cn wrote:
> From: Li Hao <li.hao40@....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?
Powered by blists - more mailing lists