[PATCH 05/11] More __read_mostly

Patrick McHardy kaber at trash.net
Fri Nov 3 13:13:17 CET 2006


Martin Josefsson wrote:
> On Fri, 3 Nov 2006, Patrick McHardy wrote:
> 
> 
>>Martin Josefsson wrote:
>>
>>>Place rarely written variables in the read-mostly section by using __read_mostly
>>>
>>>--- linux-2.6.19-rc3-git4.quilt.orig/net/netfilter/nf_conntrack_helper.c	2006-11-01 21:39:48.000000000 +0100
>>>+++ linux-2.6.19-rc3-git4.quilt/net/netfilter/nf_conntrack_helper.c	2006-11-01 21:39:51.000000000 +0100
>>>@@ -30,7 +30,7 @@
>>> #include <net/netfilter/nf_conntrack_helper.h>
>>> #include <net/netfilter/nf_conntrack_core.h>
>>>
>>>-static LIST_HEAD(helpers);
>>>+static struct list_head helpers __read_mostly = { &(helpers), &(helpers) };
>>
>>Applied, but I changed this to static __read_mostly LIST_HEAD(helpers).
> 
> 
> I thought I tried that and gcc barfed... maybe it was too late at night :)

It barfed at me too when I put it behind LIST_HEAD (for whatever
reason), but this way compiles cleanly.




More information about the netfilter-devel mailing list