* [dpdk-dev] [PATCH] ip_pipeline: fix false cacheline sharing among threads
@ 2016-06-11 15:19 Jasvinder Singh
2016-06-12 12:42 ` [dpdk-dev] [PATCH v2] " Jasvinder Singh
0 siblings, 1 reply; 3+ messages in thread
From: Jasvinder Singh @ 2016-06-11 15:19 UTC (permalink / raw)
To: dev; +Cc: cristian.dumitrescu
In ip_pipeline app, the structure app_thread_data needs to be aligned to
the cache line boundary as threads on different cpu cores are accessing
fields of the app->thread_data and having this structure not aligned on
cacheline boundary leads to false cacheline sharing.
Fixes: 7f64b9c004aa ("examples/ip_pipeline: rework config file syntax")
Signed-off-by: Jasvinder Singh <jasvinder.singh@intel.com>
Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
---
examples/ip_pipeline/app.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/examples/ip_pipeline/app.h b/examples/ip_pipeline/app.h
index 848244a..c51fc7f 100644
--- a/examples/ip_pipeline/app.h
+++ b/examples/ip_pipeline/app.h
@@ -300,7 +300,7 @@ struct app_thread_data {
uint64_t headroom_time;
uint64_t headroom_cycles;
double headroom_ratio;
-};
+}__rte_cache_aligned;
#ifndef APP_MAX_LINKS
#define APP_MAX_LINKS 16
--
2.5.5
^ permalink raw reply [flat|nested] 3+ messages in thread
* [dpdk-dev] [PATCH v2] ip_pipeline: fix false cacheline sharing among threads
2016-06-11 15:19 [dpdk-dev] [PATCH] ip_pipeline: fix false cacheline sharing among threads Jasvinder Singh
@ 2016-06-12 12:42 ` Jasvinder Singh
2016-06-14 19:13 ` Thomas Monjalon
0 siblings, 1 reply; 3+ messages in thread
From: Jasvinder Singh @ 2016-06-12 12:42 UTC (permalink / raw)
To: dev; +Cc: cristian.dumitrescu
In ip_pipeline app, the structure app_thread_data needs to be aligned to
the cache line boundary as threads on different cpu cores are accessing
fields of the app->thread_data and having this structure not aligned on
cacheline boundary leads to false cacheline sharing.
Fixes: 7f64b9c004aa ("examples/ip_pipeline: rework config file syntax")
Signed-off-by: Jasvinder Singh <jasvinder.singh@intel.com>
Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
---
v2
- fix checkpatch error
examples/ip_pipeline/app.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/examples/ip_pipeline/app.h b/examples/ip_pipeline/app.h
index 848244a..7611341 100644
--- a/examples/ip_pipeline/app.h
+++ b/examples/ip_pipeline/app.h
@@ -300,7 +300,7 @@ struct app_thread_data {
uint64_t headroom_time;
uint64_t headroom_cycles;
double headroom_ratio;
-};
+} __rte_cache_aligned;
#ifndef APP_MAX_LINKS
#define APP_MAX_LINKS 16
--
2.5.5
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [dpdk-dev] [PATCH v2] ip_pipeline: fix false cacheline sharing among threads
2016-06-12 12:42 ` [dpdk-dev] [PATCH v2] " Jasvinder Singh
@ 2016-06-14 19:13 ` Thomas Monjalon
0 siblings, 0 replies; 3+ messages in thread
From: Thomas Monjalon @ 2016-06-14 19:13 UTC (permalink / raw)
To: Jasvinder Singh; +Cc: dev, cristian.dumitrescu
2016-06-12 13:42, Jasvinder Singh:
> In ip_pipeline app, the structure app_thread_data needs to be aligned to
> the cache line boundary as threads on different cpu cores are accessing
> fields of the app->thread_data and having this structure not aligned on
> cacheline boundary leads to false cacheline sharing.
>
> Fixes: 7f64b9c004aa ("examples/ip_pipeline: rework config file syntax")
>
> Signed-off-by: Jasvinder Singh <jasvinder.singh@intel.com>
> Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
Applied, thanks
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2016-06-14 19:13 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-06-11 15:19 [dpdk-dev] [PATCH] ip_pipeline: fix false cacheline sharing among threads Jasvinder Singh
2016-06-12 12:42 ` [dpdk-dev] [PATCH v2] " Jasvinder Singh
2016-06-14 19:13 ` Thomas Monjalon
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).