From: Olivier Matz <olivier.matz@6wind.com>
To: "Burakov, Anatoly" <anatoly.burakov@intel.com>
Cc: dev@dpdk.org, "Ananyev,
Konstantin" <konstantin.ananyev@intel.com>,
"Richardson, Bruce" <bruce.richardson@intel.com>
Subject: Re: [dpdk-dev] [PATCH] ring: relax alignment constraint on ring structure
Date: Fri, 25 May 2018 17:17:48 +0200 [thread overview]
Message-ID: <20180525151748.z6vbvbbbbs3gzcv3@neon> (raw)
In-Reply-To: <5b5b3620-7674-86bb-125f-78e4796d2dea@intel.com>
On Fri, May 25, 2018 at 03:57:07PM +0100, Burakov, Anatoly wrote:
> On 25-May-18 1:18 PM, Burakov, Anatoly wrote:
> > On 25-May-18 11:59 AM, Burakov, Anatoly wrote:
> > > On 03-Apr-18 2:26 PM, Olivier Matz wrote:
> > > > The initial objective of
> > > > commit d9f0d3a1ffd4 ("ring: remove split cacheline build setting")
> > > > was to add an empty cache line betwee, the producer and consumer
> > > > data (on platform with cache line size = 64B), preventing from
> > > > having them on adjacent cache lines.
> > > >
> > > > Following discussion on the mailing list, it appears that this
> > > > also imposes an alignment constraint that is not required.
> > > >
> > > > This patch removes the extra alignment constraint and adds the
> > > > empty cache lines using padding fields in the structure. The
> > > > size of rte_ring structure and the offset of the fields remain
> > > > the same on platforms with cache line size = 64B:
> > > >
> > > > rte_ring = 384
> > > > rte_ring.name = 0
> > > > rte_ring.flags = 32
> > > > rte_ring.memzone = 40
> > > > rte_ring.size = 48
> > > > rte_ring.mask = 52
> > > > rte_ring.prod = 128
> > > > rte_ring.cons = 256
> > > >
> > > > But it has an impact on platform where cache line size is 128B:
> > > >
> > > > rte_ring = 384 -> 768
> > > > rte_ring.name = 0
> > > > rte_ring.flags = 32
> > > > rte_ring.memzone = 40
> > > > rte_ring.size = 48
> > > > rte_ring.mask = 52
> > > > rte_ring.prod = 128 -> 256
> > > > rte_ring.cons = 256 -> 512
> > > >
> > > > Link: http://dpdk.org/dev/patchwork/patch/25039/
> > > > Suggested-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
> > > > Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
> > > > ---
> > >
> > > This patch causes eal_flags_autotest to hang on FreeBSD. Root cause
> > > at this time is unknown, but this is a weird one - the test seems to
> > > hang while doing read() in bsd/eal_thread.c:59. Reverting this patch
> > > on top of rc5 results in eal_flags_autotest passing.
> > >
> >
> > Further investigation shows that for some reason, if Enter is pressed
> > while the test is seemingly "hung", it continues and passes. Or rather,
> > it hangs on one test, and if Enter is pressed, it finishes that test and
> > hangs on another, after which pressing Enter again will result in test
> > succeeding. Weird...
> >
>
> This patch is OK, the problem is in the test :) With this patch, it
> apparently blew up in just the right way, but really, the EAL flags autotest
> is wrong on FreeBSD because it launches primary processes with '--no-shconf'
> option, which corrupt main process's memory. For some reason this only began
> manifesting with this patch.
Thanks for the analysis, I was also a bit puzzled by the impact...
Olivier
prev parent reply other threads:[~2018-05-25 15:17 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-06-30 14:26 [dpdk-dev] [RFC] " Olivier Matz
2017-07-20 8:52 ` Olivier Matz
2018-04-03 13:26 ` [dpdk-dev] [PATCH] " Olivier Matz
2018-04-03 15:07 ` Jerin Jacob
2018-04-03 15:25 ` Olivier Matz
2018-04-03 15:37 ` Jerin Jacob
2018-04-03 15:56 ` Olivier Matz
2018-04-03 16:42 ` Jerin Jacob
2018-04-04 23:38 ` Ananyev, Konstantin
2018-04-05 8:01 ` Jerin Jacob
2018-04-05 13:49 ` Ananyev, Konstantin
2018-04-06 1:26 ` Jerin Jacob
2018-04-11 0:33 ` Ananyev, Konstantin
2018-04-11 2:48 ` Jerin Jacob
2018-04-11 8:40 ` Ananyev, Konstantin
2018-04-17 22:15 ` Thomas Monjalon
2018-05-25 10:59 ` Burakov, Anatoly
2018-05-25 12:18 ` Burakov, Anatoly
2018-05-25 14:57 ` Burakov, Anatoly
2018-05-25 15:17 ` Olivier Matz [this message]
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=20180525151748.z6vbvbbbbs3gzcv3@neon \
--to=olivier.matz@6wind.com \
--cc=anatoly.burakov@intel.com \
--cc=bruce.richardson@intel.com \
--cc=dev@dpdk.org \
--cc=konstantin.ananyev@intel.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).