Re: [PATCH] PPP: Optimize write buffer management

2011-03-16 Thread Patrick Porlan
Hi Denis, On Tue, 2011-03-15 at 14:28 -0500, Denis Kenzior wrote: Since we're dealing with MTUs of ~1500, our frames don't really ever exceed it. So 256 byte overhead is probably ok, but might be worth checking if making this dynamic buys us anything. Sounds like a good idea. We can expect

Re: [PATCH] PPP: Optimize write buffer management

2011-03-15 Thread Denis Kenzior
Hi Patrick, On 03/08/2011 09:58 AM, Patrick Porlan wrote: Extend the write buffer handling in gathdlc.c to minimize stalling and process switching during large PPP transfers. The single write buffer is replaced by a queue of buffers, allowing for much larger emission windows without hugely

[PATCH] PPP: Optimize write buffer management

2011-03-08 Thread Patrick Porlan
Extend the write buffer handling in gathdlc.c to minimize stalling and process switching during large PPP transfers. The single write buffer is replaced by a queue of buffers, allowing for much larger emission windows without hugely impacting memory consumption. This reduces the time required to

Re: [PATCH] PPP: Optimize write buffer management

2011-03-08 Thread Patrick Porlan
Hi Denis, On Wed, 2011-03-02 at 09:28 -0600, Denis Kenzior wrote: Is there a particular reason why you chose to use a ring buffer of ring buffers? A simple GQueue might be much easier to understand. If you are worried about 'infinite queuing' then a simple counter might help to

Re: [PATCH] PPP: Optimize write buffer management

2011-03-02 Thread Patrick Porlan
Hi Denis, On Tue, 2011-03-01 at 21:47 -0600, Denis Kenzior wrote: This is a great description, but right after reading it one should realize that this patch is better broken down into two. The first patch addressing the ringbuffer performance improvements and the second one dealing with

Re: [PATCH] PPP: Optimize write buffer management

2011-03-02 Thread Denis Kenzior
Hi Patrick, Is there a particular reason why you chose to use a ring buffer of ring buffers? A simple GQueue might be much easier to understand. If you are worried about 'infinite queuing' then a simple counter might help to alleviate that. Well, this implementation opens the door to

[PATCH] PPP: Optimize write buffer management

2011-03-01 Thread Patrick Porlan
Replace modulo operations in ringbuffer.c by masking operations. That's possible because the size of the ring buffers is always a power of two, and yields a small performance improvement. More importantly, extend the write buffer handling in gathdlc.c to minimize stalling and process switching

Re: [PATCH] PPP: Optimize write buffer management

2011-03-01 Thread Denis Kenzior
Hi Patrick, On 03/01/2011 09:07 AM, Patrick Porlan wrote: Replace modulo operations in ringbuffer.c by masking operations. That's possible because the size of the ring buffers is always a power of two, and yields a small performance improvement. More importantly, extend the write buffer