From mboxrd@z Thu Jan 1 00:00:00 1970 From: Shan Wei Subject: Re: [PATCH 4/9] net: openvswitch: use this_cpu_ptr per-cpu helper Date: Thu, 08 Nov 2012 22:22:30 +0800 Message-ID: <509BC026.4040209@gmail.com> References: <5093EE59.8010609@gmail.com> <0000013ac23ac528-19a0dd1b-3144-45df-9d6e-471999d6ae31-000000@email.amazonses.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Cc: dev-yBygre7rU0TnMu66kgdUjQ@public.gmane.org, NetDev , Kernel-Maillist , David Miller To: Christoph Lameter Return-path: In-Reply-To: <0000013ac23ac528-19a0dd1b-3144-45df-9d6e-471999d6ae31-000000-p/GC64/jrecnJqMo6gzdpkEOCMrvLtNR@public.gmane.org> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: dev-bounces-yBygre7rU0TnMu66kgdUjQ@public.gmane.org Errors-To: dev-bounces-yBygre7rU0TnMu66kgdUjQ@public.gmane.org List-Id: netdev.vger.kernel.org Christoph Lameter said, at 2012/11/3 1:46: >> u64_stats_update_begin(&stats->sync); >> stats->tx_packets++; > > Use this_cpu_inc(vport->percpu_stats->packets) here? Lots of network drivers use u64_stats_sync infrastructure for statistics on 32bit or 64bit hosts no matter how many members in per-cpu variable. keep them be consistent, so no plan to change them. Thanks