From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 9E7F0A04E6; Fri, 30 Oct 2020 20:25:09 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id DF4E36A1A; Fri, 30 Oct 2020 20:25:07 +0100 (CET) Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by dpdk.org (Postfix) with ESMTP id 158644C6B for ; Fri, 30 Oct 2020 20:25:03 +0100 (CET) IronPort-SDR: /t/f5PuIwSwluV7FsobyRqOZ8xYPKooyKo6OEzQS4o5h+LfyrYCzR6Dwmm32g0zDSimWHru//J n7DHWVPw1dSQ== X-IronPort-AV: E=McAfee;i="6000,8403,9790"; a="147940793" X-IronPort-AV: E=Sophos;i="5.77,434,1596524400"; d="scan'208";a="147940793" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 Oct 2020 12:25:02 -0700 IronPort-SDR: 7iS3mKF1xc6DT/rroKm4zRR2axOmNklqRWh7gXAV+y0HiWIPBStCVTzf63r+UBjsGz+Y6OFPh/ IWz4MYIdHRTg== X-IronPort-AV: E=Sophos;i="5.77,434,1596524400"; d="scan'208";a="527219356" Received: from pkadam-mobl1.amr.corp.intel.com (HELO [10.212.165.112]) ([10.212.165.112]) by fmsmga005-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 Oct 2020 12:25:02 -0700 To: Dmitry Kozlyuk , dev@dpdk.org Cc: Narcisa Ana Maria Vasile , Dmitry Malloy References: <20201030183113.17829-1-dmitry.kozliuk@gmail.com> <20201030184217.19098-1-dmitry.kozliuk@gmail.com> From: "Kadam, Pallavi" Message-ID: <8f20cf1a-0302-cba6-58e7-6480a1ea638a@intel.com> Date: Fri, 30 Oct 2020 12:25:01 -0700 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.12.1 MIME-Version: 1.0 In-Reply-To: <20201030184217.19098-1-dmitry.kozliuk@gmail.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-GB Subject: Re: [dpdk-dev] [PATCH v2] eal/windows: fix deadlock when setting alarm X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On 10/30/2020 11:42 AM, Dmitry Kozlyuk wrote: > Windows alarms are both armed and executed from the interrupt thread. > rte_eal_alarm_set() dispatched alarm-arming code to that thread and > waited for its completion via a spinlock. However, if called from alarm > callback (i.e. from the interrupt thread), this caused a deadlock, > because arming could not be run until its dispatcher exits, but it could > only exit after it finished waiting for arming to complete. > > Call arming code directly when running in the interrupt thread. > > Fixes: f4cbdbc7fbd2 ("eal/windows: implement alarm API") > > Reported-by: Pallavi Kadam > Signed-off-by: Dmitry Kozlyuk > --- Tested-by: Pallavi Kadam Acked-by: Pallavi Kadam >