From patchwork Mon Oct 21 17:57:03 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matthew Brost X-Patchwork-Id: 13844485 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 16721D3E1BE for ; Mon, 21 Oct 2024 17:56:43 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 12F5510E530; Mon, 21 Oct 2024 17:56:42 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="TSYOrVtB"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.17]) by gabe.freedesktop.org (Postfix) with ESMTPS id 9AFD310E114; Mon, 21 Oct 2024 17:56:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1729533402; x=1761069402; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=dJjRbo9MlBz0QJCq/ZVrTxqUK3CqkGW8RHmWUdEKZJM=; b=TSYOrVtBkKHWWSgKDA9A/ZkU/1qCtjjXXAj/9LjhXiGqpkiDgB6NtsHR i1Lt6JQF1rDerYp3hubJrP147B8cAV5TD6Zo2jCdq5XYOxHmie44wFhcZ KZCAvTsrnyUme4ChBsHiGYWw5FIFWVcdvMN200JIWW5VNjTUufzaQxjpe nP0pExhtVdcIhuFyZq5iNp1fz8JQ7NWxvfHYKx/b2rTjLmFuMRe9DceB1 Q9y8/9rJ1U2fvwH8Ly/Kpjdr1Z4xBYJ+2sR8si7O+FQXyBRs9q6XcjybT MZkM+Zc5XLFZOgLX2M3/tjpSwzlOCmFVLmtq/YspEZ4dAFD2dPaZPdTjz Q==; X-CSE-ConnectionGUID: eqg9HjLXTXa30yxuSRzqPg== X-CSE-MsgGUID: LKVisONlQWeFLhgItHvghg== X-IronPort-AV: E=McAfee;i="6700,10204,11232"; a="28910176" X-IronPort-AV: E=Sophos;i="6.11,221,1725346800"; d="scan'208";a="28910176" Received: from fmviesa008.fm.intel.com ([10.60.135.148]) by fmvoesa111.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 21 Oct 2024 10:56:40 -0700 X-CSE-ConnectionGUID: YNAjmmOhTCOWJFMDUTbu1g== X-CSE-MsgGUID: KCDOqroqSvOeYLQUunyutA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.11,221,1725346800"; d="scan'208";a="79680265" Received: from lstrano-desk.jf.intel.com ([10.54.39.91]) by fmviesa008-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 21 Oct 2024 10:56:40 -0700 From: Matthew Brost To: intel-xe@lists.freedesktop.org, dri-devel@lists.freedesktop.org Cc: dakr@kernel.org, pstanner@redhat.com Subject: [PATCH 2/4] drm/xe: Mark GGTT work queue with WQ_MEM_RECLAIM Date: Mon, 21 Oct 2024 10:57:03 -0700 Message-Id: <20241021175705.1584521-3-matthew.brost@intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20241021175705.1584521-1-matthew.brost@intel.com> References: <20241021175705.1584521-1-matthew.brost@intel.com> MIME-Version: 1.0 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" GGTT work queue is used to free memory thus we should allow this work queue to run during reclaim. Mark with GGTT work queue with WQ_MEM_RECLAIM appropriately. Signed-off-by: Matthew Brost Reviewed-by: Himal Prasad Ghimiray Reviewed-by: Badal Nilawar --- drivers/gpu/drm/xe/xe_ggtt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/xe/xe_ggtt.c b/drivers/gpu/drm/xe/xe_ggtt.c index 1b3178226987..0124ad120c04 100644 --- a/drivers/gpu/drm/xe/xe_ggtt.c +++ b/drivers/gpu/drm/xe/xe_ggtt.c @@ -246,7 +246,7 @@ int xe_ggtt_init_early(struct xe_ggtt *ggtt) else ggtt->pt_ops = &xelp_pt_ops; - ggtt->wq = alloc_workqueue("xe-ggtt-wq", 0, 0); + ggtt->wq = alloc_workqueue("xe-ggtt-wq", 0, WQ_MEM_RECLAIM); drm_mm_init(&ggtt->mm, xe_wopcm_size(xe), ggtt->size - xe_wopcm_size(xe));