Thread (24 messages) flat view 24 messages, 3 authors, 2011-03-14

Re: [PATCH 02/20] ipvs: reorganize tot_stats

From: Julian Anastasov <ja@ssi.bg>
Date: 2011-03-14 09:21:21
Also in: lvs-devel, netfilter-devel

 	Hello,

On Mon, 14 Mar 2011, Eric Dumazet wrote:
quoted
 	Also, make sure ip_vs_stats_percpu_show reads properly
the u64 stats from user context.

Signed-off-by: Julian Anastasov <ja@ssi.bg>
Signed-off-by: Simon Horman <horms@verge.net.au>
Reviewed-by: Eric Dumazet <redacted>

One comment : per cpu stats are really good to avoid cache misses, but I
see tot_stats is included in struct netns_ipvs right after "conn_count",
possibly sharing a hot cache line ?
 	conn_count and tcp_app_lock, udp_app_lock, sctp_app_lock
are used when packet creates new connection, probably on the
same time depending on the protocol in packet. May be conn_count
better to be before tcp_apps, far away from some sysctl vars
that are mostly read?

 	For tot_stats: cpustats ptr is always read,
other fields in tot_stats are updated from the 2-second
timer. May be it is better just to move tot_stats before
est_list, it is written at the same time?

Regards

--
Julian Anastasov [off-list ref]
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help