Re: pty behaviour
[email protected] (Thomas Bushnell, BSG) 05 Mar 2004 13:19:56 -0800
| Newsgroups | gmane.os.hurd.devel.readers |
|---|---|
| Message-ID | <[email protected]> |
Marcus Brinkmann <[email protected]> writes: > > Sure, sounds fine by me. As long as it's got a sane limit, the limit > > can be high. It's not like we are actually reserving all that much > > memory--nor is it like 8k is very much memory anyhow. > > Splendid. So, if we increase the high watermark, can we increase it > to a power of 2, to make best use of allocated memory (which is > doubled at each reallocation)? Or is it possible that some other code > in term enqueues character even if the queue is suspended (for > whatever reason)? I wouldn't worry about this much. Powers of two are fine, but it's not a big deal. > The second question would be, if we increase the high watermark, it > seems to make sense to also increase the low watermark, to improve > flow control. Any advice for this? The goal is to keep the queues nearly empty most of the time, not to keep them full. The only reason the low water mark isn't zero is to avoid forcing readers to wait too much. But if they aren't waiting, then we're doing ok. So yeah, some increase, but not too much. If the queues are kept mostly full, then the result is that when the writer hits the end of the array, it's likely that a lot of data has to be copied. We want to try and have the writer hit the end of the array when the queue is nearly empty, so that moving the data back to the front of the array is fast. Thomas