From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eric Dumazet Subject: Re: [PATCH net-next] net: minor optimization in qdisc_qstats_cpu_drop() Date: Wed, 24 Aug 2016 12:07:27 -0700 Message-ID: <1472065647.14381.113.camel@edumazet-glaptop3.roam.corp.google.com> References: <1472059414.14381.101.camel@edumazet-glaptop3.roam.corp.google.com> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit Cc: David Miller , netdev , John Fastabend To: Rick Jones Return-path: Received: from mail-pa0-f66.google.com ([209.85.220.66]:34825 "EHLO mail-pa0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751702AbcHXTTL (ORCPT ); Wed, 24 Aug 2016 15:19:11 -0400 Received: by mail-pa0-f66.google.com with SMTP id cf3so1672332pad.2 for ; Wed, 24 Aug 2016 12:19:11 -0700 (PDT) In-Reply-To: Sender: netdev-owner@vger.kernel.org List-ID: On Wed, 2016-08-24 at 11:04 -0700, Rick Jones wrote: > On 08/24/2016 10:23 AM, Eric Dumazet wrote: > > From: Eric Dumazet > > > > per_cpu_inc() is faster (at least on x86) than per_cpu_ptr(xxx)++; > > Is it possible it is non-trivially slower on other architectures? No, in the worst case, compiler would emit the same code.