commit | 2fdf6034a0fae9794d80e4d218e237771224ba8f | [log] [tgz] |
---|---|---|
author | Florian Westphal <[email protected]> | Tue Nov 22 13:44:19 2016 |
committer | ChromeOS Commit Bot <[email protected]> | Wed Feb 15 20:54:08 2017 |
tree | 8311b427083d4a2e2d79896ae4d40b0a9f44a890 | |
parent | 3ca3e4af7160932f6f56aa4e88baaea62f3ea1b7 [diff] |
UPSTREAM: netfilter: x_tables: pack percpu counter allocations instead of allocating each xt_counter individually, allocate 4k chunks and then use these for counter allocation requests. This should speed up rule evaluation by increasing data locality, also speeds up ruleset loading because we reduce calls to the percpu allocator. As Eric points out we can't use PAGE_SIZE, page_allocator would fail on arches with 64k page size. BUG=b:34936410 BUG=chromium:689152 TEST=Booted an image with this patch and verified iptables-restore performance improvement. Suggested-by: Eric Dumazet <[email protected]> Signed-off-by: Florian Westphal <[email protected]> Acked-by: Eric Dumazet <[email protected]> Signed-off-by: Pablo Neira Ayuso <[email protected]> (cherry picked from commit ae0ac0ed6fcf ("netfilter: x_tables: pack percpu counter allocations")) Signed-off-by: Amey Deshpande <[email protected]> Change-Id: I9cc42750879a69ce7426458463e6d35037e2e8f8 Previous-Reviewed-on: https://chromium-review.googlesource.com/437595 (cherry picked from commit 790430b314cd7e172bcea8cd402f4ed41e6eb40f) Reviewed-on: https://chromium-review.googlesource.com/443307 Reviewed-by: Guenter Roeck <[email protected]> Commit-Queue: Amey Deshpande <[email protected]> Tested-by: Amey Deshpande <[email protected]>