Messages in this thread | | | Date | Mon, 21 Jul 1997 22:20:10 -0600 (MDT) | From | Rob Riggs <> | Subject | Re: 2.0.30 serial.c, ppp.c and pppd-2.2 questions |
| |
On 21-Jul-97 Bill Hawes wrote: >Hi Rob, > >After studying your flip buffer overflow problem for a while, I have a >theory that might explain why it's overflowing. > >The flip buffer is flipped on the timer queue, and when the n_tty.c code >needs to exclude input briefly, it disables the timer queue. Under >heavy paging load, the system may have to service page faults while the >timer queue is disabled. This means there's a slight probability that >the timer queue would be disabled at the jiffy tick, so it might miss a >turn. > >This small probability could become significant if you have many ttys in >use; if any tty gets a page fault with the queue disabled, _all_ ttys >might lose their turn to flip the buffer. (Even ptys disable the timer, >and they don't even use the flip buffer!). I did a test a while back to >see what sections of code are interrupted by page faults while in >copy_xx_user, and n_tty.c was second only after pipe.c in interruptions.
I am getting full flip buffers with only an ISDN PPP connection and a single login on a VT. Don't know how many pty's are in use, but the system can be fairly idle except for a large FTP in progress when the flip buffer overflows occur. I am rarely paging on this system.
There was a false assumption made in the serial code. It assumed that an entire run through the timer task queue was made every clock tick. That may or may not happen, depending on how many other tasks need to be run, whether we have to sleep, and the number of interrupts occuring.
I can increase the rate the the flip buffer overflows a number of ways. Enabling 'kdebug 1' in pppd and decreasing the receive FIFO trigger level both do this. Though decreasing the FIFO trigger level decreases the number of FIFO overflows. This shows that increasing the rate of interrupts or increasing the amount of bottom half processing will reduce the rate at which the buffers are flipped.
Your theory may have a larger impact than I believe it does, but I would need to see some profiling data to prove it.
-Rob
| |