From patchwork Wed Mar 6 08:55:07 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Byungchul Park X-Patchwork-Id: 13583555 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 kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 68DA5C54E41 for ; Wed, 6 Mar 2024 08:56:22 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 49BAB6B00A3; Wed, 6 Mar 2024 03:55:47 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 422346B00A4; Wed, 6 Mar 2024 03:55:47 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 2274F6B00A5; Wed, 6 Mar 2024 03:55:47 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0013.hostedemail.com [216.40.44.13]) by kanga.kvack.org (Postfix) with ESMTP id 09ADE6B00A3 for ; Wed, 6 Mar 2024 03:55:47 -0500 (EST) Received: from smtpin14.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay04.hostedemail.com (Postfix) with ESMTP id B719C1A02B5 for ; Wed, 6 Mar 2024 08:55:46 +0000 (UTC) X-FDA: 81866006292.14.DB2A5E9 Received: from invmail4.hynix.com (exvmail4.hynix.com [166.125.252.92]) by imf25.hostedemail.com (Postfix) with ESMTP id E604FA0019 for ; Wed, 6 Mar 2024 08:55:44 +0000 (UTC) Authentication-Results: imf25.hostedemail.com; dkim=none; dmarc=none; spf=pass (imf25.hostedemail.com: domain of byungchul@sk.com designates 166.125.252.92 as permitted sender) smtp.mailfrom=byungchul@sk.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1709715345; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:content-type: content-transfer-encoding:in-reply-to:in-reply-to: references:references; bh=gh4V+xsf9pyOLzgDsh3k7ldaFLs7L6sYOuMIsWaURVQ=; b=qqC14/SoStBwG4dUx2SYKzn2cEVeaT7kleK/v1fDnmoICe+9lQDYo8yur1YUsS1/w0ckbG KzjaSgfije6rx5eBw6QLtPtNMnbh1hX6VOGYq4210Lbafn0pJ5nOorLUbL+lExR26aLjvZ 44Zb4wXOGiurRlHH8nE3REXTZZBUBRY= ARC-Authentication-Results: i=1; imf25.hostedemail.com; dkim=none; dmarc=none; spf=pass (imf25.hostedemail.com: domain of byungchul@sk.com designates 166.125.252.92 as permitted sender) smtp.mailfrom=byungchul@sk.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1709715345; a=rsa-sha256; cv=none; b=oV1DbhCYcSUphvE6A1M52woxsV1zFI/JVDc6bb2436c7yDbkVAiSBIyHihkcpO3sKYxumO nfdtooy14BCXaoGSzyZvY3SDyRs6OHAiA+gyCwFvSSQ95a/5sr44mIEjpP9arK4QlB75gj Wp3bQT7VDN6lmrdXy5enCDpTOidWIp4= X-AuditID: a67dfc5b-d85ff70000001748-79-65e82f7fe118 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, 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 v13 21/27] dept: Apply timeout consideration to dma fence wait Date: Wed, 6 Mar 2024 17:55:07 +0900 Message-Id: <20240306085513.41482-22-byungchul@sk.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20240306085513.41482-1-byungchul@sk.com> References: <20240306085513.41482-1-byungchul@sk.com> X-Brightmail-Tracker: H4sIAAAAAAAAAzXSa1BMYRgHcO97zp5zdllzZmvGkfvOYMalcp3HuIyZXI4PDGMMwwc2Hdpp 29hNZBilWolKqEhMt1mrlnJ2EVkSUkpKDUmlTSS6zMQuWztll/Hlmd/8n8unhyEUVokfo9ZG CjqtSqOkZKSsb1ze/BMBX4XA2tqJkHY2EBw/E0nILjZTUH+rCIHZGouh5/l6eOfsRTD86jUB men1CHLtbQRYK9sR2EwnKWjsGg9NjgEKqtPPUBCXX0xBw3c3htaM8xiKxI1Qcy4PQ7mrm4TM HgquZMZhT/mKwWUspMEYMxM6TVk0uO0LoLr9rQRsLXPh8rVWCh7aqkmoLO3E0Pggm4J286gE aiqrSKhPS5bAzf48Cr47jQQYHQM0vCnPwVAS7zlk+DEigRfJ5RgMBbcxNL0vQ/AosQODaH5L wVNHLwaLmE7A0PXnCDpT+mhIOOui4UpsCoIzCRkkxLcugeHf2dTqZfzT3gGCj7cc5m3OHJJ/ mcfx97PaaD7+UQvN54iHeItpDp//sAfzu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UBaqoQYGdbSuYPRX189nx9oDAZfAhEsKpYBuqIh7ittcc69qHCcl3zsmfAwHA3jHPUBRUneoV8533QcvTgoJ4n2DFsZkX4qxJdf+ZjU2FvVouBuJdD2tjZPskAlvTeGAlNVPTu56pHeEDy107OLbaRHtko7404Cb6zyCllJGIDXzaLnybQPsgf3Wdv3wNzIOXc9sia96BrY0C6Qij//GnSaBgD9WHI3lO9RbquinIbMGfwy+gn2YNqktPuUjRaXYT9kHdeZLR/Drjq7S4221fu+H26ARZdnvunmjTihFOToIuPkjzsSra3myDyDOuzsZPLhL2NqdgkSwENPeu1mSKG5F8mGFZ06C0gR7DimcjmNd5xGfgAU2M4/wAuVd1rfooYhM5kUQZN2127I29pgMuFV8g6oTKzYctOMAmTQgSpWs64IMtIyf0SVTdsZjuNR87FUAneYDSW6yW+E4YFlEhp0D3g== X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.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);