DPDK patches and discussions
 help / color / mirror / Atom feed
From: David Marchand <david.marchand@redhat.com>
To: Nitin Katiyar <nitin.katiyar@ericsson.com>
Cc: dev <dev@dpdk.org>, Anju Thomas <anju.thomas@ericsson.com>
Subject: Re: [dpdk-dev] [PATCH] Do RCU synchronization at fixed interval in PMD main loop.
Date: Wed, 7 Aug 2019 08:21:02 +0200	[thread overview]
Message-ID: <CAJFAV8wWS+NspH5ruFCfwVAUrbSnNfU-7_tZQJ7LC6qBhL3mDQ@mail.gmail.com> (raw)
In-Reply-To: <1565187236-22545-1-git-send-email-nitin.katiyar@ericsson.com>

Hello Nitin,

On Wed, Aug 7, 2019 at 8:13 AM Nitin Katiyar <nitin.katiyar@ericsson.com> wrote:
>
> Each PMD updates the global sequence number for RCU synchronization
> purpose with other OVS threads. This is done at every 1025th iteration
> in PMD main loop.
>
> If the PMD thread is responsible for polling large number of queues
> that are carrying traffic, it spends a lot of time processing packets
> and this results in significant delay in performing the housekeeping
> activities.
>
> If the OVS main thread is waiting to synchronize with the PMD threads
> and if those threads delay performing housekeeping activities for
> more than 3 sec then LACP processing will be impacted and it will lead
> to LACP flaps. Similarly, other controls protocols run by OVS main
> thread are impacted.
>
> For e.g. a PMD thread polling 200 ports/queues with average of 1600
> processing cycles per packet with batch size of 32 may take 10240000
> (200 * 1600 * 32) cycles per iteration. In system with 2.0 GHz CPU
> it means more than 5 ms per iteration. So, for 1024 iterations to
> complete it would be more than 5 seconds.
>
> This gets worse when there are PMD threads which are less loaded.
> It reduces possibility of getting mutex lock in ovsrcu_try_quiesce()
> by heavily loaded PMD and next attempt to quiesce would be after 1024
> iterations.
>
> With this patch, PMD RCU synchronization will be performed after fixed
> interval instead after a fixed number of iterations. This will ensure
> that even if the packet processing load is high the RCU synchronization
> will not be delayed long.
>
> Signed-off-by: Anju Thomas <anju.thomas@ericsson.com>
> Signed-off-by: Nitin Katiyar <nitin.katiyar@ericsson.com>
> ---
>  lib/dpif-netdev-perf.c | 16 ----------------
>  lib/dpif-netdev-perf.h | 17 +++++++++++++++++
>  lib/dpif-netdev.c      | 27 +++++++++++++++++++++++++++
>  3 files changed, 44 insertions(+), 16 deletions(-)

s/To: dev@dpdk.org/To: dev@openvswitch.org/



-- 
David Marchand

      reply	other threads:[~2019-08-07  6:21 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-07 14:13 Nitin Katiyar
2019-08-07  6:21 ` David Marchand [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=CAJFAV8wWS+NspH5ruFCfwVAUrbSnNfU-7_tZQJ7LC6qBhL3mDQ@mail.gmail.com \
    --to=david.marchand@redhat.com \
    --cc=anju.thomas@ericsson.com \
    --cc=dev@dpdk.org \
    --cc=nitin.katiyar@ericsson.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).