DPDK patches and discussions
 help / color / mirror / Atom feed
From: David Marchand <david.marchand@redhat.com>
To: Stanislaw Kardach <kda@semihalf.com>
Cc: David Hunt <david.hunt@intel.com>, dev <dev@dpdk.org>,
	upstream@semihalf.com,
	 Lukasz Wojciechowski <l.wojciechow@partner.samsung.com>
Subject: Re: [dpdk-dev] [RFC PATCH] test/distributor: fix burst flush on worker quit
Date: Wed, 28 Apr 2021 15:11:10 +0200	[thread overview]
Message-ID: <CAJFAV8y91HEfAC8wAep1xNa1gP21Od6Ddf+0dQu7o=v5djYcBg@mail.gmail.com> (raw)
In-Reply-To: <20210426163310.1043438-1-kda@semihalf.com>

On Mon, Apr 26, 2021 at 6:33 PM Stanislaw Kardach <kda@semihalf.com> wrote:
>
> While working on RISC-V port I have encountered a situation where worker
> threads get stuck in the rte_distributor_return_pkt() function in the
> burst test.
> After investigation some of the threads enter this function with
> flag RTE_DISTRIB_GET_BUF set in the d->retptr64[0]. At the same time
> main thread has already passed rte_distributor_process() so nobody will
> clear this flag and hence workers can't return.
>
> What I've noticed is that adding a flush just after the last _process(),
> similarly to how quit_workers() function is written in the
> test_distributor.c fixes the issue.
> Additionally the issue disappears when I remove the rdtsc delay code
> inside the rte_distributor_request_pkt().
> However I can't get this to reproduce on x86 (even with SIMD forced
> off) and with artificial delays, which is why I wonder whether I'm not
> actually hiding some other issue.
>
> Looking at the implementation of the distributor, it is based on
> __atomic_* builtins and the only platform related bit in the fast-path
> is the rte_rdtsc() and rte_pause(). There may be some issues in the
> toolchain (I've tried so far with the Ubuntu one - 10.2.0-8ubuntu1).
> I should add that all unit tests for distributor are passing so either
> there's some coverage corner case or the implementation works on RISC-V.
> As for RDTSC I'm using a sleep-stable time counter with 1MHz frequency
> and switching to high resolution cycle counter also removes the issue
> but that's the same as removing the rdtsc delay as mentioned above.
>
> I'd love to hear from You if this fix makes any sense.
>
> While modifying this test, I've also pulled in a fix from
> test_distributor.c which ensures that each thread gets his own wakeup
> packet as it's possible that when sending a burst of packets, they won't
> be spread over all the workers.

Do we have two fixes in a single patch?
This is ok if both point at the same originating commit, but else, we
need two patches with proper Fixes: line.

I see we have reviews, can you submit non-rfc patches?

Thanks.
-- 
David Marchand


  parent reply	other threads:[~2021-04-28 13:11 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CGME20210426163404eucas1p13be6ae1bbcc4b947599cb606befd5370@eucas1p1.samsung.com>
2021-04-26 16:33 ` Stanislaw Kardach
2021-04-28  7:46   ` Lukasz Wojciechowski
2021-04-28 12:50     ` David Hunt
2021-04-28 12:53       ` Stanisław Kardach
2021-04-28 13:03         ` David Hunt
2021-04-28 13:11   ` David Marchand [this message]
2021-04-28 13:22     ` Stanisław Kardach
2021-04-28 14:25   ` [dpdk-dev] [PATCH v2 0/2] test/distributor: perf burst mode quit fixes Stanislaw Kardach
2021-04-28 14:25     ` [dpdk-dev] [PATCH v2 1/2] test/distributor: fix worker notification in burst Stanislaw Kardach
2021-04-28 14:25     ` [dpdk-dev] [PATCH v2 2/2] test/distributor: fix burst flush on worker quit Stanislaw Kardach
2021-05-05 14:54     ` [dpdk-dev] [PATCH v2 0/2] test/distributor: perf burst mode quit fixes David Marchand

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='CAJFAV8y91HEfAC8wAep1xNa1gP21Od6Ddf+0dQu7o=v5djYcBg@mail.gmail.com' \
    --to=david.marchand@redhat.com \
    --cc=david.hunt@intel.com \
    --cc=dev@dpdk.org \
    --cc=kda@semihalf.com \
    --cc=l.wojciechow@partner.samsung.com \
    --cc=upstream@semihalf.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).