Re: [PATCH nf 4/8] netfilter: nf_conncount: restart search when nodes have been erased

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Dec 28, 2018 at 08:59:23AM -0600, Shawn Bohrer wrote:
> On Fri, Dec 28, 2018 at 01:24:45AM +0100, Florian Westphal wrote:
> > Also, unconditionally schedule the gc worker.
> > The condition
> > 
> >   gc_count > ARRAY_SIZE(gc_nodes))
> > 
> > cannot be true unless tree grows very large, as the height of the tree
> > will be low even with hundreds of nodes present.
>  
> But in patch 3/8 you make the worker only free nodes if gc_count >
> ARRAY_SIZE(gc_nodes)).  So the worker is going to burn CPU time
> scanning the trees but most of the time won't find enough to GC.
> 
> Also does the height of the tree matter?  I don't see how it affects
> how many empty nodes there are in the tree.

Ugh, nevermind I get it.  insert_tree() only walks the path to insert
the node and thus will only find empty nodes limited by the height of
the tree.  The worker will scan the entire tree.

--
Shawn



[Index of Archives]     [Netfitler Users]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux