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 326A8A0545; Wed, 10 Aug 2022 21:38:39 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id AC4F740E50; Wed, 10 Aug 2022 21:38:38 +0200 (CEST) Received: from mail-pj1-f51.google.com (mail-pj1-f51.google.com [209.85.216.51]) by mails.dpdk.org (Postfix) with ESMTP id 6D0B44067C for ; Wed, 10 Aug 2022 21:38:36 +0200 (CEST) Received: by mail-pj1-f51.google.com with SMTP id gp7so1345440pjb.4 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=bs67Gx/oiCJoXkm6Ynn0uCa9ZLs37UkdKjGTQNrTVQGs3aqqmR29Ttqyc9lbQiC01W b3E/7bnT13VbkKaXV0Qx3rYb4nIRkKuOHcHeK3UVuA2kqqgZAf+cdPBzYCuUpSl4RADs XO1rieEPA2XJsaf/KuOIhn1P4+dcyBAiaYv8QQxZZ5yoQzAzqKeWZORnvFUWQ8Dl7Bw0 yZoKT54v/9jCjkMSMEtLDQj72JiIC2WxWwP98PA6QFkv+iuXbfIpZqFn8WakSWoya/hy ORvrmqN9PCVwWfuqPv1F94fUPI5GhkltB17afobLCP45cj0Nch849HcGLPCW4DVqjtJg xVaw== X-Gm-Message-State: ACgBeo1qivcn7XKoNwrZgvAlopfoGcvO54zt2gUsfsNjwda6hC0vpJBw Z6L5xjBAQ74gsGUH72bQPtAP7g== 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: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-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