From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id B3417A0545 for ; Wed, 10 Aug 2022 21:38:38 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 8EF734068E; Wed, 10 Aug 2022 21:38:38 +0200 (CEST) Received: from mail-pl1-f179.google.com (mail-pl1-f179.google.com [209.85.214.179]) by mails.dpdk.org (Postfix) with ESMTP id 718624068E for ; Wed, 10 Aug 2022 21:38:36 +0200 (CEST) Received: by mail-pl1-f179.google.com with SMTP id z19so15127976plb.1 for ; Wed, 10 Aug 2022 12:38:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20210112.gappssmtp.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:from:to:cc; bh=eKNVcmZziNZbs3a521K80mhInsFNgmsu6tYM8r0kjqQ=; b=ANWSQfdpZUPEGUnU5Jdg6kQjbjyBXXRbzZNAouWolLOATklmxfAByGTaFSreJpiDvE VusozpgOhHcPwa+itvkCN68tDKhjwxygqN/NpyVRmmorRDiNYKH5O9luXDAg9YH2eTEs 2kpGGAJn4Nf+NVoqfoGsvZV9C2VfJOHibF8WXSHTmcbhBJtAMCzxyXX4cFhMrvMJGjwn SuNUKt3NW0ZNHmvUjcif7owQLL8e8RLNWxsY48cHxFHdBe8fFLk1HbsJpOGOJU1NnwqI 4fvzzYi0jHCH2zEkVv3nW54cD/Yf30ffftwo3+ZnRGS0a3ykKxKIjQgUTZUI4LkHPPaF wHEA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:x-gm-message-state:from:to:cc; bh=eKNVcmZziNZbs3a521K80mhInsFNgmsu6tYM8r0kjqQ=; b=N9upnGrl26OXHUoFR/CUm9R5pzvT3kaiSneWJIriMB0/A3mhjDPUegNFNuLlpjFgM/ 37mpBJUw2rbQ5K0Ww+P5izNewGtlBDfGT0gPnNl9QbGP3RN3lFg/jY78v4xxMCC/h+YM +WCnXq9ISEG6FewoFwQlYkhq2fyeYpEBNOE0R0jX2CAkyChbFzeeuP0pjDECWrxwsRaW 6XpkUe0VhkSfMWs4a9RESOIkC5ND6ZNiGw36sXFsvxt5dvZ9aPIeCxhdk5A3SDMId3hL c1EpqsB4jG+ZEWrvsffNUAUd1zCwaQi7+MtQetQIW292qqBiWoYjQzlMx21blnHhXdxV AJgQ== X-Gm-Message-State: ACgBeo03fBzY1u5CPH8Vy6sT5LNazfL6N9IGJCG21HdTb+Pm9qokD87S 1VfuYQaDF9wDTG2E8Inijyo7PbmLQ6DgpA== X-Google-Smtp-Source: AA6agR4wlXmD3Qmj6kYyda/Y861hTs3A1mjKeWVkoiCamtF6laaoGud5LAOC4bOcVcqbTdQ01EEH0g== X-Received: by 2002:a17:90b:4ccb:b0:1f5:20b4:fc9e with SMTP id nd11-20020a17090b4ccb00b001f520b4fc9emr5289474pjb.69.1660160315606; Wed, 10 Aug 2022 12:38:35 -0700 (PDT) Received: from hermes.local (204-195-120-218.wavecable.com. [204.195.120.218]) by smtp.gmail.com with ESMTPSA id w19-20020a170902ca1300b0016d6420691asm13113214pld.207.2022.08.10.12.38.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 10 Aug 2022 12:38:35 -0700 (PDT) Date: Wed, 10 Aug 2022 12:38:33 -0700 From: Stephen Hemminger To: "Carrillo, Erik G" Cc: "Naga Harish K, S V" , "dev@dpdk.org" , "stable@dpdk.org" Subject: Re: [PATCH v2 3/4] timer: fix function to stop all timers Message-ID: <20220810123833.6838e009@hermes.local> In-Reply-To: References: <20220803162651.3145945-1-s.v.naga.harish.k@intel.com> <20220810070958.3111119-1-s.v.naga.harish.k@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org On Wed, 10 Aug 2022 19:29:36 +0000 "Carrillo, Erik G" wrote: > Hi Harish, > > > -----Original Message----- > > From: Naga Harish K, S V > > Sent: Wednesday, August 10, 2022 2:10 AM > > To: Carrillo, Erik G > > 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." > Yes, the timer owner flag acts like a lock and this is AB BA deadlock