From patchwork Tue Nov 30 12:19:34 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Thomas Hellstrom X-Patchwork-Id: 12647143 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 7CCA1C433EF for ; Tue, 30 Nov 2021 12:19:58 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id ABBA56E41A; Tue, 30 Nov 2021 12:19:54 +0000 (UTC) Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by gabe.freedesktop.org (Postfix) with ESMTPS id 40F5F6E284; Tue, 30 Nov 2021 12:19:53 +0000 (UTC) X-IronPort-AV: E=McAfee;i="6200,9189,10183"; a="234926309" X-IronPort-AV: E=Sophos;i="5.87,275,1631602800"; d="scan'208";a="234926309" Received: from orsmga006.jf.intel.com ([10.7.209.51]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 Nov 2021 04:19:52 -0800 X-IronPort-AV: E=Sophos;i="5.87,275,1631602800"; d="scan'208";a="459577046" Received: from hekner-mobl5.ger.corp.intel.com (HELO thellstr-mobl1.intel.com) ([10.249.254.206]) by orsmga006-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 Nov 2021 04:19:50 -0800 From: =?utf-8?q?Thomas_Hellstr=C3=B6m?= To: intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org Date: Tue, 30 Nov 2021 13:19:34 +0100 Message-Id: <20211130121936.586031-1-thomas.hellstrom@linux.intel.com> X-Mailer: git-send-email 2.31.1 MIME-Version: 1.0 Subject: [Intel-gfx] [RFC PATCH 0/2] Attempt to avoid dma-fence-[chain|array] lockdep splats X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linaro-mm-sig@lists.linaro.org, =?utf-8?q?Thomas_Hellstr=C3=B6m?= , matthew.auld@intel.com, =?utf-8?q?Christian_K=C3=B6nig?= Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" Introducing more usage of dma-fence-chain and dma-fence-array in the i915 driver we start to hit lockdep splats due to the recursive fence locking in the dma-fence-chain and dma-fence-array containers. This is a humble suggestion to try to establish a dma-fence locking order (patch 1) and to avoid excessive recursive locking in these containers (patch 2) Thomas Hellström (2): dma-fence: Avoid establishing a locking order between fence classes dma-fence: Avoid excessive recursive fence locking from enable_signaling() callbacks drivers/dma-buf/dma-fence-array.c | 23 +++++++-- drivers/dma-buf/dma-fence-chain.c | 12 ++++- drivers/dma-buf/dma-fence.c | 79 +++++++++++++++++++++---------- include/linux/dma-fence.h | 4 ++ 4 files changed, 89 insertions(+), 29 deletions(-) Cc: linaro-mm-sig@lists.linaro.org Cc: dri-devel@lists.freedesktop.org Cc: Christian König