Re: [PATCH] Use tty_schedule in VT code.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> If a tty driver has marked itself low-latency, it's still wrong to do the 
> flush_to_ldisc() from interrupt context if a console event happens in 
> interrupt context.

It should be ok nowdays. Calling ld->receive() paths directly from an IRQ
is verboted however.

> I thought that was the whole *point* of the difference between 
> "tty_schedule_flip()" and "con_schedule_flip()", as far as I know. The 
> "con_schedule_flip()" can be called from any context (console messages), 
> while "tty_schedule_flip()" is only called from well-behaved tty layer.

I have no idea of the history of con_schedule_flip and I leave it alone 8)
> 
> But I really don't know. I used to be involved with the tty layer, these 
> days I'd rather avoid it. This "simple" patch seems to be anything but, 
> and I'd like somebody to just make sure that all the issues are taken care 
> of.
> 
> Alan?

For tty it is ok to call tty_flip_buffer_push from an IRQ. It is also ok
for this to do stuff based on the low latency flag. Any private internal
knowledge of that happens is at the drivers peril and may change.

We *need* low latency to do MIDI, Digitrax DCC and a few other things.

A driver which sets ->low_latency must allow its own write() method to be
called back as a result of calling tty_flip_buffer_push, and that
requires care on driver coding. (Arguably we should have a ->echo()
method for this but that opens other cans of worms)

Alan

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux