From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eric Dumazet Subject: Re: [PATCH 02/20] ipvs: reorganize tot_stats Date: Mon, 14 Mar 2011 05:28:23 +0100 Message-ID: <1300076903.2761.64.camel@edumazet-laptop> References: <1300074346-13799-1-git-send-email-horms@verge.net.au> <1300074346-13799-3-git-send-email-horms@verge.net.au> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: QUOTED-PRINTABLE Cc: netdev@vger.kernel.org, netfilter-devel@vger.kernel.org, netfilter@vger.kernel.org, lvs-devel@vger.kernel.org, Julian Anastasov , Hans Schillstrom To: Simon Horman Return-path: In-Reply-To: <1300074346-13799-3-git-send-email-horms@verge.net.au> Sender: lvs-devel-owner@vger.kernel.org List-Id: netdev.vger.kernel.org Le lundi 14 mars 2011 =C3=A0 12:45 +0900, Simon Horman a =C3=A9crit : > From: Julian Anastasov >=20 > The global tot_stats contains cpustats field just like the > stats for dest and svc, so better use it to simplify the usage > in estimation_timer. As tot_stats is registered as estimator > we can remove the special ip_vs_read_cpu_stats call for > tot_stats. Fix ip_vs_read_cpu_stats to be called under > stats lock because it is still used as synchronization between > estimation timer and user context (the stats readers). >=20 > Also, make sure ip_vs_stats_percpu_show reads properly > the u64 stats from user context. >=20 > Signed-off-by: Julian Anastasov > Signed-off-by: Simon Horman Reviewed-by: Eric Dumazet 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 ? Thanks