From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stephen Hemminger Subject: Re: [PATCH] sched: add 64-bit counter retrieval API Date: Mon, 23 Jul 2018 09:52:52 -0700 Message-ID: <20180723095252.4a93ea91@xeon-e3> References: <1531925499-938-1-git-send-email-alan.dewar@att.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: cristian.dumitrescu@intel.com, dev@dpdk.org, Alan Dewar To: alangordondewar@gmail.com Return-path: Received: from mail-pl0-f66.google.com (mail-pl0-f66.google.com [209.85.160.66]) by dpdk.org (Postfix) with ESMTP id C3F35160 for ; Mon, 23 Jul 2018 18:52:55 +0200 (CEST) Received: by mail-pl0-f66.google.com with SMTP id z7-v6so467590plo.9 for ; Mon, 23 Jul 2018 09:52:55 -0700 (PDT) In-Reply-To: <1531925499-938-1-git-send-email-alan.dewar@att.com> List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On Wed, 18 Jul 2018 15:51:39 +0100 alangordondewar@gmail.com wrote: > From: Alan Dewar > > Add new APIs to retrieve counters in 64-bit wide fields. > > Signed-off-by: Alan Dewar Do you want to consider 64 bit counter roll over on 32 bit platform? The problem is that incrementing an 64 bit value is not atomic on 32 bit cpu. The carry operation can race with reading. The kernel has special case code to do restartable sequence for accessing 64 bit counter on 32 bit CPU. These functions become nop's on 64bit.