netfilter: nf_tables: avoid atomic allocations for set flush
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v2 Latest2 patches 3 repliesIn review
- v12 patches 15 repliesSuperseded
Patches in v2 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/2 | netfilter: nf_tables: allow iter callbacks to sleepinclude/ net/ net/ | +128 | 3 replies | |
| 2/2 | netfilter: nf_tables: all transaction allocations can now sleepnet/ | +19 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.
Cover letter [PATCH nf-next v2 0/2] netfilter: nf_tables: avoid atomic allocations for set flush
Sven Auhagen reports memory allocation errors during set flush. This is because of GFP_ATOMIC allocations because rhashtable walker uses rcu and cannot sleep.
Build a linear list in rhashtable walker, drop rcu read lock and then call the iter callback in a second loop.
This allows use of GFP_KERNEL allocations.
The second loop has no noticeable impact on set flush durations, even for large (800k entries) sets.
Florian Westphal (2):
netfilter: nf_tables: allow iter callbacks to sleep
netfilter: nf_tables: all transaction allocations can now sleep
include/net/netfilter/nf_tables.h | 2 + net/netfilter/nf_tables_api.c | 47 ++++++-------- net/netfilter/nft_set_hash.c | 102 +++++++++++++++++++++++++++++- net/netfilter/nft_set_rbtree.c | 35 +++++++--- 4 files changed, 147 insertions(+), 39 deletions(-)
Signature · 1 line
2.49.1