Re: [PATCH] net: filter: Convert the BPF VM to threaded code
From: Francois Romieu <romieu@fr.zoreil.com>
Date: 2011-07-30 10:11:18
From: Francois Romieu <romieu@fr.zoreil.com>
Date: 2011-07-30 10:11:18
Rui Ueyama [off-list ref] :
The result of benchmark looks good.
So far the overall improvement is below 2% (upper bound, without calculator). And the result of benchmark without tcpdump looks strange.
A simple benchmark that sends 10M UDP packets to lo took 76.24 seconds on average on Core 2 Duo L7500@1.6GHz.when tcpdump is running. With this patch it took 75.41 seconds, which means we save 80ns for each packet on that processor.
You forgot to analyze the figures without tcpdump.
I think converting the VM to threaded code is low hanging fruit, even if we'd have JIT compilers for popular architectures. Most of the lines in my patch are indentation change, so the actual change is not big.
Without further data nor plan for future / possible improvements, it could be said a gratuitous rewrite too. -- Ueimor