From patchwork Wed Jan 24 11:59:32 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Byungchul Park X-Patchwork-Id: 13529116 Received: from invmail4.hynix.com (exvmail4.hynix.com [166.125.252.92]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 32E9365BC0; Wed, 24 Jan 2024 12:00:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=166.125.252.92 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706097614; cv=none; b=S2IqMYN+WWqc4u2ka/1sxk2fCOcycoKeeac3gqT1Au9iG7a4XI4233PhMzZP7/pMlfWcP6IdBIe1dEd8BDQS55NMcnRLQqzcj3tWt997bplOnoQpHjnFAluJf1pCcSrRg1Np4ej4Aa4PZ6/IhnDM/KYNlnAym/TS3+fKzlMDlWE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706097614; c=relaxed/simple; bh=A0HNCh9MAJFiyY64P3s+ZnF2ZrT06e1PDF08t8YO27Y=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References; b=njUqifyynp6vnjKTyWLx69qyTFRPVGIinTYV4Et3tybfSqnv9yPn/GNb40VTMkbQqSfQXkqQFsm9iDl9ta5EZGcQ4FBaveM1n8Hf6y7h6fKM4dele9tbS/j+PX4EAdq2H989asCr2bD9YRa8PgDJA4nIO9T0ivxbpCf4mBFgERg= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=sk.com; spf=pass smtp.mailfrom=sk.com; arc=none smtp.client-ip=166.125.252.92 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=sk.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=sk.com X-AuditID: a67dfc5b-d85ff70000001748-96-65b0fbb71d9f From: Byungchul Park To: linux-kernel@vger.kernel.org Cc: kernel_team@skhynix.com, torvalds@linux-foundation.org, damien.lemoal@opensource.wdc.com, linux-ide@vger.kernel.org, adilger.kernel@dilger.ca, linux-ext4@vger.kernel.org, mingo@redhat.com, peterz@infradead.org, will@kernel.org, tglx@linutronix.de, rostedt@goodmis.org, joel@joelfernandes.org, sashal@kernel.org, daniel.vetter@ffwll.ch, duyuyang@gmail.com, johannes.berg@intel.com, tj@kernel.org, tytso@mit.edu, willy@infradead.org, david@fromorbit.com, amir73il@gmail.com, gregkh@linuxfoundation.org, kernel-team@lge.com, linux-mm@kvack.org, akpm@linux-foundation.org, mhocko@kernel.org, minchan@kernel.org, hannes@cmpxchg.org, vdavydov.dev@gmail.com, sj@kernel.org, jglisse@redhat.com, dennis@kernel.org, cl@linux.com, penberg@kernel.org, rientjes@google.com, vbabka@suse.cz, ngupta@vflare.org, linux-block@vger.kernel.org, josef@toxicpanda.com, linux-fsdevel@vger.kernel.org, viro@zeniv.linux.org.uk, jack@suse.cz, jlayton@kernel.org, dan.j.williams@intel.com, hch@infradead.org, djwong@kernel.org, dri-devel@lists.freedesktop.org, rodrigosiqueiramelo@gmail.com, melissa.srw@gmail.com, hamohammed.sa@gmail.com, 42.hyeyoo@gmail.com, chris.p.wilson@intel.com, gwan-gyeong.mun@intel.com, max.byungchul.park@gmail.com, boqun.feng@gmail.com, longman@redhat.com, hdanton@sina.com, her0gyugyu@gmail.com Subject: [PATCH v11 21/26] dept: Apply timeout consideration to dma fence wait Date: Wed, 24 Jan 2024 20:59:32 +0900 Message-Id: <20240124115938.80132-22-byungchul@sk.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20240124115938.80132-1-byungchul@sk.com> References: <20240124115938.80132-1-byungchul@sk.com> X-Brightmail-Tracker: H4sIAAAAAAAAAzWSa0hTYRjHfc/lPcfV6jCDjkkUC+lGF8vqKSKMiA5EVgR9KKhGHtpom7GZ lyCynGUru9G0UsIba23q1lZppaKWlxXlylVLVNTsIs0L1iybXTajLw8/nj/P7/nyZ0nZ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uXizFVd6KWq7kqjQ0qdCNlJfK/PPbZ9/vvp+/fgKjvcxNEfSR +1VjpGLQEZEVN640zysZtKsLf7VqIS1lIfj6kljILrIRqC8sQGC7FY+h88FaeNnfhWDwaR0D Gen1CK62vWHgltuLoCL/OIGGjvHQ6OshUJt+moD5WhGB55+GMLRcOI+hwLEBHp/LxVA58IGF jE4CWRlmPHw+YhiwWHmwxAVCe34mD0Nti6DW28RB9eVaDiqa58ClKy0EyitqWXC72jE0lGYT 8Nr+cPDYXcNCfVoqBze7cwl86rcwYPH18PCiMgeDPWHYlvjtNwcPUysxJF4vxtD4qgzB3aRW DA5bE4FqXxcGpyOdgZ95DxC0n/nMw4mUAR6y4s8gOH3iAgt1vx5ykNASDIM/ssmalbS6q4eh Cc6DtKI/h6WPcmV6J/MNTxPuNvM0x3GAOvOD6LXyTkyvfvVx1GE9Rajj63meJn9uxLT72TOe 1lwcZGlHYwbePHW7uCpUNeijVeOC1SFi2Pd3ZrKvQThUY/fwcaiAT0Z+giwtle/fbkUjTKRZ ssczwIywvzRTdqa+55KRKDDSybFyfu9TMlJMkDbKHWWFo2NWCpTzSpJHWSMtk+uKSsg/6Qy5 wF45KvIbzm9eamZHWCsFy63Ws/w5JOagMVbkr4+MjlD0huD5pvCwmEj9ofl7oiIcaPhpLLFD aS7U17C2CkkC0o3TrLEWqVpOiTbFRFQhWWB0/hrP5EJVqwlVYg6rxqhdxgMG1VSFAgRWN0mz bpsaopX2KvvVcFXdpxr/t1jwmxKHnNM0mWjx+u4bnoDYHdO3rjfLb6fbEpcsvR872+WqEQ9v 16Q8WeHK2wQHcVxV8OvFifdcEle4K2SH4SJDj7w8RjK9xe4toV9uiO5Vz3f3lcNcS8gc5DW3 KeZjpX+ME53i7TvK0Z12T1tA9OtZ5uKgPuPy+KbAqEmhx8f39mQl6VhTmLIoiDGalL/cQIe1 MAMAAA== X-CFilter-Loop: Reflected Precedence: bulk X-Mailing-List: linux-block@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Now that CONFIG_DEPT_AGGRESSIVE_TIMEOUT_WAIT was introduced, apply the consideration to dma fence wait. Signed-off-by: Byungchul Park --- drivers/dma-buf/dma-fence.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/dma-buf/dma-fence.c b/drivers/dma-buf/dma-fence.c index 76dba11f0dab..95121cbcc6b5 100644 --- a/drivers/dma-buf/dma-fence.c +++ b/drivers/dma-buf/dma-fence.c @@ -784,7 +784,7 @@ dma_fence_default_wait(struct dma_fence *fence, bool intr, signed long timeout) cb.task = current; list_add(&cb.base.node, &fence->cb_list); - sdt_might_sleep_start(NULL); + sdt_might_sleep_start_timeout(NULL, timeout); while (!test_bit(DMA_FENCE_FLAG_SIGNALED_BIT, &fence->flags) && ret > 0) { if (intr) __set_current_state(TASK_INTERRUPTIBLE); @@ -888,7 +888,7 @@ dma_fence_wait_any_timeout(struct dma_fence **fences, uint32_t count, } } - sdt_might_sleep_start(NULL); + sdt_might_sleep_start_timeout(NULL, timeout); while (ret > 0) { if (intr) set_current_state(TASK_INTERRUPTIBLE);