From mboxrd@z Thu Jan 1 00:00:00 1970 From: Pavan Nikhilesh Bhagavatula Subject: Re: [PATCH v4 2/3] eal: add u64 bit variant for reciprocal Date: Wed, 6 Sep 2017 10:02:45 +0530 Message-ID: <20170906043244.GA27242@PBHAGAVATULA-LT> References: <1504608532-18598-1-git-send-email-pbhagavatula@caviumnetworks.com> <1504608532-18598-2-git-send-email-pbhagavatula@caviumnetworks.com> <20170905102901.0d9db417@xeon-e3> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: dev@dpdk.org To: Stephen Hemminger Return-path: Received: from NAM01-BY2-obe.outbound.protection.outlook.com (mail-by2nam01on0063.outbound.protection.outlook.com [104.47.34.63]) by dpdk.org (Postfix) with ESMTP id CBB883DC for ; Wed, 6 Sep 2017 06:33:18 +0200 (CEST) Content-Disposition: inline In-Reply-To: <20170905102901.0d9db417@xeon-e3> 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 Tue, Sep 05, 2017 at 10:29:01AM -0700, Stephen Hemminger wrote: > On Tue, 5 Sep 2017 16:18:51 +0530 > Pavan Nikhilesh wrote: > > > +/** > > + * Unsigned 32-bit divisor structure. > > + */ > > +struct rte_reciprocal_u32 { > > uint32_t m; > > uint8_t sh1, sh2; > > -}; > > +} __rte_cache_aligned; > > + > > +/** > > + * Unsigned 64-bit divisor structure. > > + */ > > +struct rte_reciprocal_u64 { > > + uint64_t m; > > + uint8_t sh1; > > +} __rte_cache_aligned; > > I understand you want to squeeze every cycle out but it is not > required that each of these structures always be cache aligned. > > They maybe embedded in other structures and having the structure > padded so that these elements are cache aligned would take up > more space and make cache performance worse. > > Better off to not put attributes on the structure definitions, and instead > let usages of this feature align where appropriate. > Agreed, will remove cache alignment in the next version (v6). Thanks, Pavan.