From: Ilya Zykov <ilya@ilyx.ru>
To: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
linux-kernel@vger.kernel.org,
Andrew McGregor <andrew.mcgregor@alliedtelesis.co.nz>
Subject: Re: [PATCH] tty: Add driver unthrottle in ioctl(...,TCFLSH,..).
Date: Thu, 22 Nov 2012 01:55:46 +0400 [thread overview]
Message-ID: <50AD4DE2.7080002@ilyx.ru> (raw)
In-Reply-To: <20121121213037.154306da@pyramind.ukuu.org.uk>
On 22.11.2012 1:30, Alan Cox wrote:
>> Function reset_buffer_flags() also invoked during the
>> ioctl(...,TCFLSH,..). At the time of request we can have full buffers
>> and throttled driver too. If we don't unthrottle driver, we can get
>> forever throttled driver, because after request, we will have
>> empty buffers and throttled driver and there is no place to unthrottle driver.
>> It simple reproduce with "pty" pair then one side sleep on tty->write_wait,
>> and other side do ioctl(...,TCFLSH,..). Then there is no place to do writers wake up.
>
>
> So instead of revertng it why not just fix it ? Just add an argument to
> the reset_buffer_flags function to indicate if unthrottling is permitted.
>
> Alan
>
Maybe we don't need call reset_buffer_flags() then execute tty_release()
and (tty->count != 0)? Why in this case we reset buffers?
next prev parent reply other threads:[~2012-11-22 18:30 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-11-21 21:12 [PATCH] tty: Add driver unthrottle in ioctl(...,TCFLSH,..) Ilya Zykov
2012-11-21 21:30 ` Alan Cox
2012-11-21 21:39 ` Ilya Zykov
2012-11-22 0:47 ` andrew mcgregor
2012-11-22 4:29 ` Ilya Zykov
2012-11-22 5:25 ` andrew mcgregor
2012-11-22 6:35 ` Ilya Zykov
2012-11-22 6:03 ` Ilya Zykov
2012-11-22 6:16 ` Ilya Zykov
2012-11-21 21:55 ` Ilya Zykov [this message]
-- strict thread matches above, loose matches on Subject: below --
2012-11-27 6:14 [PATCH v4] " Ilya Zykov
2012-11-27 17:24 ` Greg Kroah-Hartman
2012-11-27 18:46 ` Ilya Zykov
2012-11-27 19:32 ` Alan Cox
2013-01-16 9:07 ` [PATCH] " Ilya Zykov
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=50AD4DE2.7080002@ilyx.ru \
--to=ilya@ilyx.ru \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=andrew.mcgregor@alliedtelesis.co.nz \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.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.