Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=198.175.65.20 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796073147; b=co/QnLqA2qUJXJIKFs3bTxunCTZW3agGTYnZ6NOJj5cGHjg6fiqsojpsjUzzDnI1jhQZ TxH8l45VI2Fc3UvR24SUenMuBgaQuqQtLCd04WPiFS5hAZdxJTJX5etO3/CjPtzsoHYGQ HVJZC4l9JSUIzKWun58hmWgzaICzDO7/paFx8dhbzhCEiX2vZ01KYORYunMhBj3kkCGgK bZJ+TigqsWiPHNBhQccOkx/73OU5yCnHIgiQCsB+gX1H2v0BGJ81omItjQ0H6NmV/TFAn 24u6KNVhBxSrkrLF4h2lqfz3JfvDShbxW2JU1AxQOiBXBQSQRf61gQA0Lqx5VngZQjg== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796073147; h=DMARC-Filter:DKIM-Signature:X-CSE-ConnectionGUID:X-CSE-MsgGUID: X-IronPort-AV:X-IronPort-AV:Received:X-CSE-ConnectionGUID: X-CSE-MsgGUID:X-ExtLoop1:X-IronPort-AV:Received:From:To:Cc:Subject: Date:Message-ID:X-Mailer:In-Reply-To:References:MIME-Version: Content-Transfer-Encoding; bh=1p+R3s/Nfxc6hGQWDez0V/+ymROhuCaY2sEmG6h7ePE=; b=OMUFJawJSlJg++b3/YEUJEkuU3i7OozyVzWFVUSU7Wj/VifPvQ8mT1yP2l+uw3znZzNP mbXwMo3PXOrQOPJRPI3Cy4QucyUGrTdr0P4uMuvPCH0k9ZwDZPJ6xyKy+si0Q42J1be88 yxG2jQgzYwqD4UKsuFGVrcIFoIBwEvycfEoIHu6XaeVPr1daECHD17TJajySAH8FznVtj 2kZAqcMHf8lSVXj2EwP9AjkGjted6q9mr/5gLhOoQ/PC/GGVOhda+5rttdwh+Y8hPetOw +vfTSNhsYL7K7081EMiBCv/iPHdKI8VHguhL22qu2l/Y/TYGnQvTwwD7Q+3PIsttG2Q== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=intel.com; spf=pass smtp.mailfrom=intel.com; dkim=pass header.d=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=gJ7u39uR; arc=none smtp.remote-ip=198.175.65.20 Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.20]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A8516606A31A for ; Mon, 30 Nov 2026 21:12:26 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org A8516606A31A Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=intel.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key, unprotected) header.d=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=gJ7u39uR DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1796073147; x=1827609147; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=1p+R3s/Nfxc6hGQWDez0V/+ymROhuCaY2sEmG6h7ePE=; b=gJ7u39uRj3tnfm+gO2bhroYPNwIh/JjXIs0yIoNsxQSaS8xqoOEuaS/h N9/QLtUAKJ2/Hfq1RntkBmtUbD2A08mEH9s4oQYqB8BEKKUcACvwuKltT v3hyPQGneZAkDcE4GkqF8xsuNWbzXVDLxD3ipFJE6Vqn6JOkP642UF0W2 QKb523mWLhrBm9DqTCaAfN93e1fee25WFMyqE6LOQhzDRH+lkhQwORDTu ZebW42ZvoB/HTHSb0y1ivR/VATJjrDxu+5wpgIUFKYMVO839WDcHQdRj/ AvzmabIA2zaYvTkhnedgjjfSju5C+GSOvzzNwN5tIN3Lhy/6ldqqkvZaF A==; X-CSE-ConnectionGUID: gJAeDJ8iQRO50bDnjI3AOQ== X-CSE-MsgGUID: OcZ/JUhdRXqKmEcRL9L74g== X-IronPort-AV: E=McAfee;i="6800,10657,11982"; a="4969364" X-IronPort-AV: E=Sophos;i="6.27,243,1787036400"; d="scan'208";a="4969364" Received: from fmviesa007.fm.intel.com ([10.60.135.147]) by orvoesa112.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 Nov 2026 13:12:26 -0800 X-CSE-ConnectionGUID: UVMS3aqUSjKJ9z0svytCrA== X-CSE-MsgGUID: aY6cvKgDR4aLo22hC47b1g== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.27,243,1787036400"; d="scan'208";a="13366620" Received: from jf5300-15a101203tc.jf.intel.com (HELO meta-crater2c.jf.intel.com) ([10.54.113.49]) by fmviesa007.fm.intel.com with ESMTP; 30 Nov 2026 13:12:26 -0800 From: Daniel Byrne To: dmaengine@vger.kernel.org Cc: Daniel Byrne , Vinod Koul , Frank Li , Vinicius Costa Gomes , Dave Jiang , Ziyu Zhang Subject: Re: [PATCH v2 10/10] dmaengine: idxd: test a queue under its lock before quiescing it Date: Mon, 30 Nov 2026 13:06:07 -0800 Message-ID: <20261130210607.1914190-1-daniel1.byrne@intel.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: References: <20261130194721.1900266-1-daniel1.byrne@intel.com> <20261130194721.1900266-11-daniel1.byrne@intel.com> X-Mailing-List: dmaengine@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Transfer-Encoding: 8bit On Mon, 30 Nov 2026 20:09:29 +0000, sashiko-bot@kernel.org wrote: > Can idxd_misc_thread() still deadlock on wq->wq_lock against a command > waiter in idxd_drv_enable_wq() or idxd_drv_disable_wq()? Yes, it can, and it could before this patch. v7.4-rc2 makes the same test without the lock and then calls idxd_wq_quiesce(), which takes wq_lock, from the same thread. The patch does not change which queues the thread waits for. It repeats the test once the lock is held. The changelog and the comment say so for the unbind. They are wrong about the enable. Only the enable command itself runs while the queue does not read as an enabled kernel queue yet. What idxd_drv_enable_wq() issues after it, the interrupt handle request and the commands of its error path, runs under wq_lock with the queue reading enabled, and the thread waits behind those too. I'll correct both texts in the next version. This series does not close the wait. Ziyu Zhang's patch takes the call out of the handle revoke path, which leaves the halt handler as the only caller: https://lore.kernel.org/r/20261125133123.98687-1-ziyuzhang201@gmail.com Thanks, Daniel