History

netfilter: xtables: stackptr should be percpu

commit f3c5c1bfd4 (netfilter: xtables: make ip_tables reentrant) introduced a performance regression, because stackptr array is shared by all cpus, adding cache line ping pongs. (16 cpus share a 64 bytes cache line) Fix this using alloc_percpu()

Eric Dumazet committed 16 years ago

Commit 7489aec1 parent c936e8b4 files · +6 −13Browse files

Showing the changes to include/linux (1 of 4 files). Show all

Unified · Split

include/linux/netfilter/x_tables.h+1−1
@@ -397,7 +397,7 @@ struct xt_table_info { · 396 unmodified lines
397397 * @stacksize jumps (number of user chains) can possibly be made.
398398 */
399399 unsigned int stacksize;
400− unsigned int *stackptr;
400+ unsigned int __percpu *stackptr;
401401 void ***jumpstack;
402402 /* ipt_entry tables: one per CPU */
403403 /* Note : this field MUST be the last one, see XT_TABLE_INFO_SZ */

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t