From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pg1-f195.google.com (mail-pg1-f195.google.com [209.85.215.195]) by dpdk.org (Postfix) with ESMTP id 3818D37A2 for ; Tue, 31 Jul 2018 20:07:42 +0200 (CEST) Received: by mail-pg1-f195.google.com with SMTP id f1-v6so9463686pgq.12 for ; Tue, 31 Jul 2018 11:07:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=BfVeCSUVgUb14JJV4iLqIZuDJZ+8I+XYo3XVtmo4vJo=; b=xNhXq3CuvkRJdgPk0Sr8oLwE9jeN+p1V3c/4ftUFoMsiz6CdIn6agkaeluttJ4Ddib N6NDhGRPwHF/CDUj7lc6gmRw2sgiovoKhBTygpS9L3/1y2lOoFFn1k7xjVXkj/5ttgfT uJP7F01MinGgqTZLYQoQ0idGm1bCqDfeVufFr5RYv05wqSskB2D+vZj3SaQeSg353/la sIB17kpF3ddySlMwbTkKqL+265KljOMCNk4TfcNP0bJ+w5lVEB8dNqAgKM3ZIXRiew/H DSd0BamPpnPU+nR7G6Pd2VmMcKSKqBs626fNYYMHyBgUlyqT8cbpqeC6RNJIuvnMYMdH 4p5w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=BfVeCSUVgUb14JJV4iLqIZuDJZ+8I+XYo3XVtmo4vJo=; b=QRlfh+pNmZLuWbd6VW1rr86YbDecyJNC8MhehSElTDIRWV4hA2p4BtQ1EjbfyUd4Ks XLNM9HY1+lRHLy2Jz7dsznsxqXZ26gidE2wzWrQp7TUIlyAlcHDCz4zLuQ3AgfojoI26 F//sBquWGNULa/ceM+7PqCWnn+BHVd9tmPtqifLM0nHRIM87+bmjWCyuYdt87Zzh57qo 2XC3EfN+KqqGUpXbdGCpIxWep5s7KJ5mf7/pJRL4h7di8+rP9NtGajv1ssQ0+907zLa9 /dKMt3WOPMh+/EPrPgvJIA/UwicEP1TAXiG41PXi90UlLovRAM0+r6MRtkvuRvooUMso IAXQ== X-Gm-Message-State: AOUpUlEgxftsnVAgB8BTSz01P3KBQDAevoRMwZP9ytgQK3jQX6KwgfNF FstuVnK03gvWjffsmhmFDpVw4XJ5Z7c= X-Google-Smtp-Source: AAOMgpfVZnGEBUd5O8VKwyNaFNlygf6guTr0PR1tgICLXKfgjZDpmIwoFbkB+0mIwMTpQRsHHMOM/Q== X-Received: by 2002:a63:5fc1:: with SMTP id t184-v6mr20749079pgb.183.1533060461187; Tue, 31 Jul 2018 11:07:41 -0700 (PDT) Received: from xeon-e3 (204-195-22-127.wavecable.com. [204.195.22.127]) by smtp.gmail.com with ESMTPSA id j191-v6sm31526711pfc.136.2018.07.31.11.07.40 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 31 Jul 2018 11:07:40 -0700 (PDT) Date: Tue, 31 Jul 2018 11:07:37 -0700 From: Stephen Hemminger To: Adrien Mazarguil Cc: dev@dpdk.org Message-ID: <20180731110737.38555f02@xeon-e3> In-Reply-To: <20180731164840.GD5211@6wind.com> References: <20180731163059.27085-1-stephen@networkplumber.org> <20180731164840.GD5211@6wind.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH 0/5] remove usage of register keyword in C X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 31 Jul 2018 18:07:42 -0000 On Tue, 31 Jul 2018 18:48:40 +0200 Adrien Mazarguil wrote: > On Tue, Jul 31, 2018 at 09:30:54AM -0700, Stephen Hemminger wrote: > > Declaring variables as register in C is a leftover from an earlier > > era (like cassette tape decks in cars). > > I don't agree here. It's a hint for compilers and developers that the > address of such variables won't be needed (and cannot be taken) to enable > whatever optimizations are possible knowing this. > > Somewhat like inline functions, it's not a forced optimization, just a > useful hint that shouldn't hurt if used wisely. > > Besides, cassette decks are not dead yet :) If you look at the code, that is not how register is being used (ie. don't take address of this). It seems like an attempt at optimization.