DPDK patches and discussions
 help / color / mirror / Atom feed
From: "Carrillo, Erik G" <erik.g.carrillo@intel.com>
To: "Gavin Hu (Arm Technology China)" <Gavin.Hu@arm.com>,
	"dev@dpdk.org" <dev@dpdk.org>
Subject: Re: [dpdk-dev] [PATCH 1/1] timer: fix race condition
Date: Wed, 19 Dec 2018 16:11:57 +0000	[thread overview]
Message-ID: <BE54F058557D9A4FAC1D84E2FC6D87572336C0B5@fmsmsx115.amr.corp.intel.com> (raw)
In-Reply-To: <VI1PR08MB3167D271D857C308183793A38FBE0@VI1PR08MB3167.eurprd08.prod.outlook.com>

> > > However, if a timer expires quickly enough, there exists the
> > > following race condition that causes the timer_manage() routine to
> > > misinterpret a timer in CONFIG state, resulting in lost timers:
> > >
> > > - Thread A:
> > >   - starts a timer with rte_timer_reset()
> > >   - the timer is moved to CONFIG state
> > >   - the spinlock associated with the appropriate skiplist is acquired
> > >   - timer is inserted into the skiplist
> > >   - the spinlock is released
> > > - Thread B:
> > >   - executes rte_timer_manage()
> > >   - find above timer as expired, add it to run list
> > >   - walk run list, see above timer still in CONFIG state, unlink it from
> > >     run list and continue on
> > > - Thread A:
> > >   - move timer to PENDING state
> > >   - return from rte_timer_reset()
> > >   - timer is now in PENDING state, but not actually linked into
> > > skiplist
> Add "nor the run list"?

<...snipped...>

> Other than the minor comment,
> Reviewed-by: Gavin Hu <gavin.hu@arm.com>
> 

<...snipped...>

Thanks for the review, Gavin.  I've made the update and resubmitted.

Regards,
Erik

  reply	other threads:[~2018-12-19 16:11 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-29 18:53 Erik Gabriel Carrillo
2018-12-19  3:36 ` Thomas Monjalon
2018-12-19  7:57   ` Gavin Hu (Arm Technology China)
2018-12-19 16:11     ` Carrillo, Erik G [this message]
2018-12-19 16:09 ` [dpdk-dev] [PATCH v2] " Erik Gabriel Carrillo
2018-12-19 18:54   ` Thomas Monjalon

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=BE54F058557D9A4FAC1D84E2FC6D87572336C0B5@fmsmsx115.amr.corp.intel.com \
    --to=erik.g.carrillo@intel.com \
    --cc=Gavin.Hu@arm.com \
    --cc=dev@dpdk.org \
    /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).