LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Kernel (https://www.linuxquestions.org/questions/linux-kernel-70/)
-   -   Linux - Kernel - tty buffer working (https://www.linuxquestions.org/questions/linux-kernel-70/linux-kernel-tty-buffer-working-4175635382/)

mgupta 07-31-2018 07:58 PM

Linux - Kernel - tty buffer working
 
I am in the process of understanding tty_core and it's buffering mechanism. So far I have been struggling with how buffering works in tty_core. Can someone please explain or point me to right resource. I have read TTY Driver section in LDD3 already which explains more about tty driver/s.

AwesomeMachine 07-31-2018 08:35 PM

This is pretty good info on ttys: https://static.lwn.net/images/pdf/LDD3/ch18.pdf

mgupta 07-31-2018 08:51 PM

Quote:

Originally Posted by AwesomeMachine (Post 5886273)
This is pretty good info on ttys: https://static.lwn.net/images/pdf/LDD3/ch18.pdf

Thanks!!! I have already read that chapter. However, I am reading kernel code to make more understanding of buffering concept and how that makes to line discipline and then on to user process. Somehow kernel is intricately managing all of that.

So far most of tty code that I am reading is
- tty_io.c
- tty_port.c
- tty_ldisc.c
- tty_buffer.c
- n_tty.c

The confusing part, so far, is how in-built buffering works. And when some data is available, how does that makes to attached line discipline (my understanding is via work queues and flush_to_ldisc is primary function that gets called when scheduled).

Thanks in advance


All times are GMT -5. The time now is 07:00 PM.