Hello, On Wed, Aug 02, 2017 at 10:10:51AM +0200, Martin Pieuchot wrote: > On 18/07/17(Tue) 15:55, Martin Pieuchot wrote: > > When forwarding a lot of traffic with 10G interfaces contention on the > > NET_LOCK() is "visible". Each time you type "ifconfig" you can go grab > > a coffee... > > > > The problem has a name: pf_purge_thread(). This thread is created by > > default and run even if you don't have PF enabled. Every `hz' it wakes > > up, grab the lock and go to sleep. > > > > Since the execution of this thread is serialized with the `softnet' task, > > it makes more sense to execute it in the same context. This reduce the > > NET_LOCK() contention and implicitly preempt the packet processing. > > > > Diff below improves the situation with PF disabled, I didn't test with > > PF enabled. > > Updated diff that includes sashan@ suggestions and do not stop the purge > task when PF is disabled. Otherwise some states are not purged until PF > is re-enabled. This can be optimized later. >
thank Hrvoje for spotting the glitch. change looks good (actually better) to me. OK sashan@