lkml.org 
[lkml]   [2009]   [Oct]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [Bug #14388] keyboard under X with 2.6.31
Date
Linus Torvalds <torvalds@linux-foundation.org> writes:

> On Fri, 16 Oct 2009, OGAWA Hirofumi wrote:
>>
>> I.e. the following or something,
>>
>> static inline int input_available_p(struct tty_struct *tty, int amt)
>> {
>> int try = 0;
>>
>> retry:
>> if (tty->icanon) {
>> if (tty->canon_data)
>> return 1;
>> } else if (tty->read_cnt >= (amt ? amt : 1))
>> return 1;
>>
>> if (!checked) {
>> tty_flush_to_ldisc(tty);
>> try = 1;
>> goto retry;
>> }
>>
>> return 0;
>> }
>
> Yeah, we could do that. Especially if we ever see this in any profiles. I
> doubt we do, but..

Yes. Or, FWIW, I was thinking to delete schedule_delayed_work() for
n_tty with flag or something at previous time. I.e. disable background
flush_to_ldisc() by writer for n_tty, only n_tty_read() will check
tty.buf synchronously.

So, with it, unnecessary flush_to_ldisc() is removed completely... Well...

Thanks.
--
OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>


\
 
 \ /
  Last update: 2009-10-16 00:33    [W:0.087 / U:0.064 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site