From patchwork Mon Jul 3 09:47:47 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Byungchul Park X-Patchwork-Id: 13299835 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 F053BC16B13 for ; Mon, 3 Jul 2023 09:50:23 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id E845F8E00B4; Mon, 3 Jul 2023 05:49:58 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id E329A8E00B2; Mon, 3 Jul 2023 05:49:58 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id C84D78E00B4; Mon, 3 Jul 2023 05:49:58 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0011.hostedemail.com [216.40.44.11]) by kanga.kvack.org (Postfix) with ESMTP id AAD108E00B2 for ; Mon, 3 Jul 2023 05:49:58 -0400 (EDT) Received: from smtpin15.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay01.hostedemail.com (Postfix) with ESMTP id 619C81C86B4 for ; Mon, 3 Jul 2023 09:49:58 +0000 (UTC) X-FDA: 80969829276.15.7F97523 Received: from invmail4.hynix.com (exvmail4.skhynix.com [166.125.252.92]) by imf01.hostedemail.com (Postfix) with ESMTP id 7211940010 for ; Mon, 3 Jul 2023 09:49:56 +0000 (UTC) Authentication-Results: imf01.hostedemail.com; dkim=none; spf=pass (imf01.hostedemail.com: domain of byungchul@sk.com designates 166.125.252.92 as permitted sender) smtp.mailfrom=byungchul@sk.com; dmarc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1688377796; 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=H0MAQpFzxA4s5RXLatsmNiKyUne2G3ye16I5Y8qdGHQ=; b=15uyGUOsMbuPXeJLHaLjNsKp4u687NeY2K8PIsM03NMjKkFxeMQEHMbQlK5NQpgTe7KAVl X1MfgUkJRo5i+exvXHJt8RRr7DXRbDuMJG9+BxusWrcLGKFZ5akQXcXjmXvncsSUQ1epkq Lo+etbmmGGAuGW+WzYizMVFddVY5tG0= ARC-Authentication-Results: i=1; imf01.hostedemail.com; dkim=none; spf=pass (imf01.hostedemail.com: domain of byungchul@sk.com designates 166.125.252.92 as permitted sender) smtp.mailfrom=byungchul@sk.com; dmarc=none ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1688377796; a=rsa-sha256; cv=none; b=TWUMU3MEFB8Oie5HSgQ21ggStyPjeFG3O5nwPxuF+a/jeyUPqbiejdCZghrIT3+Hu5QX/Y Tlr4r8dSMPlRoVHhC1TFYM6Y35TPu14R/XRz8si6VMhu6y582iFj6xNlmeLWbYhN64aR8p jJNinybF722rZVkCTZxmmQZ/N8C3Qsg= X-AuditID: a67dfc5b-d85ff70000001748-1b-64a299b4ca43 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 v10 rebased on v6.4 20/25] dept: Apply timeout consideration to waitqueue wait Date: Mon, 3 Jul 2023 18:47:47 +0900 Message-Id: <20230703094752.79269-21-byungchul@sk.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20230703094752.79269-1-byungchul@sk.com> References: <20230703094752.79269-1-byungchul@sk.com> X-Brightmail-Tracker: H4sIAAAAAAAAAzWSa0hTcRjG+//P1eXksIxOCRUjK4wuVtpL9yjofAm6fBAyqtEOOZpm07x0 Ic1puVKyWOal2qbMpZY1DTJTluWti1mNXGaSYhfLtbK2nNPKGX15+fE8PL9PL0vIaqkZrCou UdTEKdRyWkJKnIHGhTUFJuWSz0WhkHd2Cbh/niahuKqSho4bFQgqa9IxDDRthk7PIALf02cE 5Os7EBh73xJQ09yDoN5ykoaX/UFgd7toaNOfoSGjpIqG519GMXRfPI+hwroFHp8zYbB5P5KQ P0BDUX4GHj+fMHjN5QyY00Khz1LIwGhvOLT1vKKgvmsBFFzppuFefRsJzXf6MLy8W0xDT+Uf Ch43t5LQkZdDwfWvJhq+eMwEmN0uBl7YDBhuasdFWT9+U9CSY8OQVXoLg/11HYKG0+8wWCtf 0fDAPYih2qonYKSsCUFfrpOBzLNeBorScxGcybxIwrOxFgq03RHgGy6m168UHgy6CEFbnSzU ewyk8MjEC7WF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BOdxNCm2Bn4+0ovgvGKVzycKIvxUH+8AsGZEzUsPHv/kANbIB1m ZxpIZgbtmYww1Nb2A+2cdrL0cZNE7zlGeWrrGuGpUymkbe6V9FJHGNPGd1GOKs2nCVXeVfO0 9JUf09dPn/L00blZlob8tXjzop2qtXrZaLDIpq/WZatynG8jXMFt/vD5sNGKbKQUCYIkrpHs trRSlCAQcbk0PBxj4k4Wl0ht5X9ypUglMOLJjyX3mz4SLz4Rd0v20242blZcKt17MMDFrRa/ kRwjNhy3JC6WWm52/zeUMJ//MVOB4taI6VKgLkgqkcqJPmpGyYY8S67OYExfbT6YU5RnOLx6 X36uguZfxvXjXNVdNDW43oNEAWkT1cNHG/UaTmcxF+V6kCQw2mR18dhFvUat1xUdkU35e0yF RtnsQSkCq/1M/f02OVsj7tcdkg/KcoFs+r/FQsJCK+rYzmd/+8XU2O7exmOh54o1K3ONEFo2 6svKVD5dsS2xK+WnBZUHet9zBrpKP/vmTp+y6BerumrL3kDGnQmLY+ZxamK1ZkflUMmGwmDA U7AYq7d+Hrq6I99bMuA4W7bL8XX6dE312mX6cU34O2nnvpSI721Z0hFv1rqY09Lv9yw5oGXN Obq0lYzJrPsA5RcDsy4DAAA= X-CFilter-Loop: Reflected X-Rspamd-Queue-Id: 7211940010 X-Rspam-User: X-Stat-Signature: p1hizyhqf45mmnyuio3h4gxkyowfa3e3 X-Rspamd-Server: rspam01 X-HE-Tag: 1688377796-453643 X-HE-Meta: U2FsdGVkX19Jkwh1yMuMLtYwPFv9g/KTwMryhMHmD9da4yeSEwwXHylzvcQA6I023n49Yy4FfluuIrWYaeUaR+++pWR27ipblbzK684el76JbmTXO07SwJvud1/NJPh/ifSrPiMEbbNZkAnR/vBfwe++XYGvQBLbe1OPMlxhel9z4YGBT6ZCfIeBDuJCb+bfgLhI4FD3/FdapMWlgyOqU7H3Udzi7XA7rw0vuwf564WzSIMhwVbHGT1gumvkEmvQayHPzmesUU3lgq8u0NrSEk61YQY4KYDa6HI0OkJRMZTAdICduDmrffkSpVNBtaI87UbPVhihHYmhHYabikAK90m/M8U/3R6HsYV1HdnrCK8XFgiHMDaSAIFZh2N1pBzhtWWOnj0LPp1MtRljkgjuPNxmhVkhpYmNyrjOYxjx3NdetMkW1YnhR53N5sxVV3yBgv26tvgxREgy9EPiTZcfmDY/zdoL6yqag6Xn+G8nvkSksUiergvWWVALZjaWOa2lKgXautokiGwmkA4Verj4yA3o/x67sd/CG7yDpmmZQNPQ1GGlFPDfOo4gzkcOgY5qME6xoWrGnBs7POuLgQcRIq5e5PaT+ohoWCpn+SYVAEqTAcd4CXyW7MEknYYFTZBOWUjgbiZdNyK2jXgyK07TtMXlZXMLOumbWicvCkDcXv2NWwXDA2q3STEgROY73kIg7iKMMusaqkPfHr9csCQPQhKADSpPbX1vDoXP869CbXlyec7irhAYB6+p3OSZSw+cT0V37sSu/UWud2y9jhbTu2ZvFbziNDe9UdbrY6NzGFjLJzX+8iV7OzMkgoqYfuxrQGrPjcmYHi7SUs/L7S989zFN1XX0GmWn1swgyxzkl02owZcUPL4KAabGBGnrPGA3bSqLhH1r4A7JJ5LyKYjUQYBJUDrIaaATLcIeBdrV3aeoGM/sZrK69ZQnaNjFpE44olhPU5LnFIXPcIIAaVl tsycCMr5 71Nr9Ho4XONs3oUTFTv2L86X3ow10Wa/rCzuJhl+grFQ0qJb6I9v05DszM6PD5d0yW8Ve 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: Now that CONFIG_DEPT_AGGRESSIVE_TIMEOUT_WAIT was introduced, apply the consideration to waitqueue wait, assuming an input 'ret' in ___wait_event() macro is used as a timeout value. Signed-off-by: Byungchul Park --- include/linux/wait.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/linux/wait.h b/include/linux/wait.h index ff349e609da7..aa1bd964be1e 100644 --- a/include/linux/wait.h +++ b/include/linux/wait.h @@ -304,7 +304,7 @@ extern void init_wait_entry(struct wait_queue_entry *wq_entry, int flags); struct wait_queue_entry __wq_entry; \ long __ret = ret; /* explicit shadow */ \ \ - sdt_might_sleep_start(NULL); \ + sdt_might_sleep_start_timeout(NULL, __ret); \ init_wait_entry(&__wq_entry, exclusive ? WQ_FLAG_EXCLUSIVE : 0); \ for (;;) { \ long __int = prepare_to_wait_event(&wq_head, &__wq_entry, state);\