DPDK patches and discussions
 help / color / mirror / Atom feed
From: Stephen Hemminger <stephen@networkplumber.org>
To: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
Cc: dev@dpdk.org, cristian.dumitrescu@intel.com
Subject: Re: [dpdk-dev] [PATCH v4 2/3] eal: add u64 bit variant for reciprocal
Date: Tue, 5 Sep 2017 10:29:01 -0700	[thread overview]
Message-ID: <20170905102901.0d9db417@xeon-e3> (raw)
In-Reply-To: <1504608532-18598-2-git-send-email-pbhagavatula@caviumnetworks.com>

On Tue,  5 Sep 2017 16:18:51 +0530
Pavan Nikhilesh <pbhagavatula@caviumnetworks.com> 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.

  reply	other threads:[~2017-09-05 17:29 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-05 10:48 [dpdk-dev] [PATCH v4 1/3] eal: introduce integer divide through reciprocal Pavan Nikhilesh
2017-09-05 10:48 ` [dpdk-dev] [PATCH v4 2/3] eal: add u64 bit variant for reciprocal Pavan Nikhilesh
2017-09-05 17:29   ` Stephen Hemminger [this message]
2017-09-06  4:32     ` Pavan Nikhilesh Bhagavatula
2017-09-05 10:48 ` [dpdk-dev] [PATCH v4 3/3] test: add tests for reciprocal based division Pavan Nikhilesh

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170905102901.0d9db417@xeon-e3 \
    --to=stephen@networkplumber.org \
    --cc=cristian.dumitrescu@intel.com \
    --cc=dev@dpdk.org \
    --cc=pbhagavatula@caviumnetworks.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).