Re: [PATCH net-next] sch_netem: faster rb tree removal

2017-09-25 Thread David Miller
From: Eric Dumazet Date: Sat, 23 Sep 2017 11:07:28 -0700 > From: Eric Dumazet > > While running TCP tests involving netem storing millions of packets, > I had the idea to speed up tfifo_reset() and did experiments. > > I tried the

Re: [PATCH net-next] sch_netem: faster rb tree removal

2017-09-25 Thread David Ahern
On 9/25/17 2:11 PM, David Miller wrote: > From: David Ahern > Date: Mon, 25 Sep 2017 10:14:23 -0600 > >> I made a simple program this morning and ran it under perf. > > If possible please submit this for selftests. > It is more of a microbenchmark of options to flush an

Re: [PATCH net-next] sch_netem: faster rb tree removal

2017-09-25 Thread David Miller
From: David Ahern Date: Mon, 25 Sep 2017 10:14:23 -0600 > I made a simple program this morning and ran it under perf. If possible please submit this for selftests. Thank you.

Re: [PATCH net-next] sch_netem: faster rb tree removal

2017-09-25 Thread Eric Dumazet
On Mon, 2017-09-25 at 10:14 -0600, David Ahern wrote: > Thanks for the test. > > I made a simple program this morning and ran it under perf. With the > above suggestion the rb_erase has a high cost because it always deletes > the root node. Your method 1 has a high cost on rb_first which is >

Re: [PATCH net-next] sch_netem: faster rb tree removal

2017-09-25 Thread David Ahern
On 9/24/17 11:27 PM, Eric Dumazet wrote: > On Sun, 2017-09-24 at 20:05 -0600, David Ahern wrote: >> On 9/24/17 7:57 PM, David Ahern wrote: > >>> Hi Eric: >>> >>> I'm guessing the cost is in the rb_first and rb_next computations. Did >>> you consider something like this: >>> >>> struct

Re: [PATCH net-next] sch_netem: faster rb tree removal

2017-09-24 Thread Eric Dumazet
On Sun, 2017-09-24 at 20:05 -0600, David Ahern wrote: > On 9/24/17 7:57 PM, David Ahern wrote: > > Hi Eric: > > > > I'm guessing the cost is in the rb_first and rb_next computations. Did > > you consider something like this: > > > > struct rb_root *root > > struct rb_node **p =

Re: [PATCH net-next] sch_netem: faster rb tree removal

2017-09-24 Thread David Ahern
On 9/24/17 7:57 PM, David Ahern wrote: > On 9/23/17 12:07 PM, Eric Dumazet wrote: >> From: Eric Dumazet >> >> While running TCP tests involving netem storing millions of packets, >> I had the idea to speed up tfifo_reset() and did experiments. >> >> I tried the

Re: [PATCH net-next] sch_netem: faster rb tree removal

2017-09-24 Thread David Ahern
On 9/23/17 12:07 PM, Eric Dumazet wrote: > From: Eric Dumazet > > While running TCP tests involving netem storing millions of packets, > I had the idea to speed up tfifo_reset() and did experiments. > > I tried the rbtree_postorder_for_each_entry_safe() method that is >