DPDK patches and discussions
 help / color / mirror / Atom feed
From: "Naga Harish K, S V" <s.v.naga.harish.k@intel.com>
To: "Carrillo, Erik G" <erik.g.carrillo@intel.com>
Cc: "dev@dpdk.org" <dev@dpdk.org>, "stable@dpdk.org" <stable@dpdk.org>
Subject: RE: [PATCH v2 3/4] timer: fix function to stop all timers
Date: Thu, 11 Aug 2022 15:42:37 +0000	[thread overview]
Message-ID: <DM6PR11MB3868C3F30BEDF821E416733EA1649@DM6PR11MB3868.namprd11.prod.outlook.com> (raw)
In-Reply-To: <IA1PR11MB6418A3667ECEEAF35FD5E45DB9659@IA1PR11MB6418.namprd11.prod.outlook.com>

Hi Gabe,

> -----Original Message-----
> From: Carrillo, Erik G <erik.g.carrillo@intel.com>
> Sent: Thursday, August 11, 2022 1:00 AM
> To: Naga Harish K, S V <s.v.naga.harish.k@intel.com>
> Cc: dev@dpdk.org; stable@dpdk.org
> Subject: RE: [PATCH v2 3/4] timer: fix function to stop all timers
> 
> Hi Harish,
> 
> > -----Original Message-----
> > From: Naga Harish K, S V <s.v.naga.harish.k@intel.com>
> > Sent: Wednesday, August 10, 2022 2:10 AM
> > To: Carrillo, Erik G <erik.g.carrillo@intel.com>
> > Cc: dev@dpdk.org; stable@dpdk.org
> > Subject: [PATCH v2 3/4] timer: fix function to stop all timers
> >
> > There is a possibility of deadlock in this API, as same spinlock is
> > tried to be acquired in nested manner.
> >
> > In timer_del function, if the previous owner and current owner lcore
> > are
> 
> It might be clearer to say something like:
> 
>  "If the lcore that is stopping the timer is different from the lcore that owns
> the timer, the timer list lock is acquired in timer_del(), even if local_is_locked
> is true.  Because the same lock was already acquired in rte_timer_stop_all(),
> the thread will hang."
> 

Incorporated the commit message in v3 version of the patch

> Thanks,
> Erik
> 
> > different, the lock is tried to be acquired even though the same lock
> > is already acquired by the caller of timer_del function.
> >
> > This patch removes the acquisition of nested locking.
> >
> > Fixes: 821c51267bcd63a ("timer: add function to stop all timers in a
> > list")
> > Cc: stable@dpdk.org
> >
> > Signed-off-by: Naga Harish K S V <s.v.naga.harish.k@intel.com>
> > ---


  parent reply	other threads:[~2022-08-11 15:42 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-03 16:26 [PATCH 3/4] timer: fix rte_timer_stop_all Naga Harish K S V
2022-08-03 17:49 ` Stephen Hemminger
2022-08-10  7:20   ` Naga Harish K, S V
2022-08-10  7:09 ` [PATCH v2 3/4] timer: fix function to stop all timers Naga Harish K S V
2022-08-10 19:29   ` Carrillo, Erik G
2022-08-10 19:38     ` Stephen Hemminger
2022-08-11 15:42     ` Naga Harish K, S V [this message]
2022-08-11 15:37   ` [PATCH v3 " Naga Harish K S V
2022-08-12 16:07     ` [PATCH v4 " Naga Harish K S V
2022-08-18 13:12       ` Carrillo, Erik G
2022-08-10  7:01 [PATCH v2 " Naga Harish K S V

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=DM6PR11MB3868C3F30BEDF821E416733EA1649@DM6PR11MB3868.namprd11.prod.outlook.com \
    --to=s.v.naga.harish.k@intel.com \
    --cc=dev@dpdk.org \
    --cc=erik.g.carrillo@intel.com \
    --cc=stable@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).