From: Ferruh Yigit <ferruh.yigit@intel.com>
To: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>,
thomas@monjalon.net, jerin.jacob@caviumnetworks.com,
techboard@dpdk.org
Cc: dev@dpdk.org
Subject: Re: [dpdk-dev] [PATCH 1/2] eal: add macro to mark variable mostly read only
Date: Wed, 18 Apr 2018 18:43:11 +0100 [thread overview]
Message-ID: <cae76804-2fb4-e5b4-11a1-f2373927dcf3@intel.com> (raw)
In-Reply-To: <20180418153035.5972-1-pbhagavatula@caviumnetworks.com>
On 4/18/2018 4:30 PM, Pavan Nikhilesh wrote:
> Add macro to mark a variable to be mostly read only and place it in a
> separate section.
>
> Signed-off-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
> ---
>
> Group together mostly read only data to avoid cacheline bouncing, also
> useful for auditing purposes.
>
> lib/librte_eal/common/include/rte_common.h | 5 +++++
> 1 file changed, 5 insertions(+)
>
> diff --git a/lib/librte_eal/common/include/rte_common.h b/lib/librte_eal/common/include/rte_common.h
> index 6c5bc5a76..f2ff2e9e6 100644
> --- a/lib/librte_eal/common/include/rte_common.h
> +++ b/lib/librte_eal/common/include/rte_common.h
> @@ -114,6 +114,11 @@ static void __attribute__((constructor(prio), used)) func(void)
> */
> #define __rte_noinline __attribute__((noinline))
>
> +/**
> + * Mark a variable to be mostly read only and place it in a separate section.
> + */
> +#define __rte_read_mostly __attribute__((__section__(".read_mostly")))
Hi Pavan,
Is the section ".read_mostly" treated specially [1] or is this just for grouping
symbols together (to reduce cacheline bouncing)?
[1]
If this is special section, can you please point counter part in the kernel?
> +
> /*********** Macros for pointer arithmetic ********/
>
> /**
> --
> 2.17.0
>
next prev parent reply other threads:[~2018-04-18 17:43 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-04-18 15:30 Pavan Nikhilesh
2018-04-18 15:30 ` [dpdk-dev] [PATCH 2/2] drivers: mark logtype variables as read mostly Pavan Nikhilesh
2018-04-18 17:43 ` Ferruh Yigit [this message]
2018-04-18 17:55 ` [dpdk-dev] [PATCH 1/2] eal: add macro to mark variable mostly read only Pavan Nikhilesh
2018-04-18 18:03 ` Ferruh Yigit
2018-04-19 9:20 ` Pavan Nikhilesh
2018-04-19 12:09 ` Bruce Richardson
2018-04-19 15:18 ` Pavan Nikhilesh
2018-04-19 15:37 ` Bruce Richardson
2018-04-19 15:55 ` 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=cae76804-2fb4-e5b4-11a1-f2373927dcf3@intel.com \
--to=ferruh.yigit@intel.com \
--cc=dev@dpdk.org \
--cc=jerin.jacob@caviumnetworks.com \
--cc=pbhagavatula@caviumnetworks.com \
--cc=techboard@dpdk.org \
--cc=thomas@monjalon.net \
/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).