Re: [PATCH net-next] net: netem: use a list in addition to rbtree

2018-12-04 Thread David Miller
From: Peter Oskolkov Date: Tue, 4 Dec 2018 11:10:55 -0800 > Thanks, Stephen! > > I don't care much about braces either. David, do you want me to send a > new patch with braces moved around? Single statement basic blocks definitely must not have curly braces, please remove them and repost.

Re: [PATCH net-next] net: netem: use a list in addition to rbtree

2018-12-04 Thread Peter Oskolkov
On Tue, Dec 4, 2018 at 11:11 AM Peter Oskolkov wrote: > > Thanks, Stephen! > > I don't care much about braces either. David, do you want me to send a > new patch with braces moved around? Sent a v2 with style fixes, just in case. > > On Tue, Dec 4, 2018 at 9:56 AM Stephen Hemminger > wrote: >

Re: [PATCH net-next] net: netem: use a list in addition to rbtree

2018-12-04 Thread Peter Oskolkov
Thanks, Stephen! I don't care much about braces either. David, do you want me to send a new patch with braces moved around? On Tue, Dec 4, 2018 at 9:56 AM Stephen Hemminger wrote: > > I like this, it makes a lot of sense since packets are almost > always queued in order. > > Minor style stuff

Re: [PATCH net-next] net: netem: use a list in addition to rbtree

2018-12-04 Thread Stephen Hemminger
I like this, it makes a lot of sense since packets are almost always queued in order. Minor style stuff you might want to fix (but don't have to). > + if (!last || > + t_last->time_to_send > last->time_to_send) { > +

Re: [PATCH net-next] net: netem: use a list in addition to rbtree

2018-12-04 Thread Eric Dumazet
On 12/03/2018 05:07 PM, Peter Oskolkov wrote: > When testing high-bandwidth TCP streams with large windows, > high latency, and low jitter, netem consumes a lot of CPU cycles > doing rbtree rebalancing. > > This patch uses a linear list/queue in addition to the rbtree: > if an incoming packet

[PATCH net-next] net: netem: use a list in addition to rbtree

2018-12-03 Thread Peter Oskolkov
When testing high-bandwidth TCP streams with large windows, high latency, and low jitter, netem consumes a lot of CPU cycles doing rbtree rebalancing. This patch uses a linear list/queue in addition to the rbtree: if an incoming packet is past the tail of the linear queue, it is added there,