From patchwork Mon Aug 21 03:46:32 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Byungchul Park X-Patchwork-Id: 13359074 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 60DEAEE49A6 for ; Mon, 21 Aug 2023 03:50:31 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 55923940016; Sun, 20 Aug 2023 23:50:01 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 50BF994000C; Sun, 20 Aug 2023 23:50:01 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 13C83940016; Sun, 20 Aug 2023 23:50:01 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0015.hostedemail.com [216.40.44.15]) by kanga.kvack.org (Postfix) with ESMTP id F06B894000C for ; Sun, 20 Aug 2023 23:50:00 -0400 (EDT) Received: from smtpin26.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay06.hostedemail.com (Postfix) with ESMTP id A591FB1DD4 for ; Mon, 21 Aug 2023 03:50:00 +0000 (UTC) X-FDA: 81146733360.26.77BFC12 Received: from invmail4.hynix.com (exvmail4.hynix.com [166.125.252.92]) by imf03.hostedemail.com (Postfix) with ESMTP id D7A0D20009 for ; Mon, 21 Aug 2023 03:49:58 +0000 (UTC) Authentication-Results: imf03.hostedemail.com; dkim=none; dmarc=none; spf=pass (imf03.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=1692589799; 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=v+gn/V9k1A5Mxh+bLEIYOzx6n/gk7l3/hLAXIrbknNSKMWN23k2LuYA3QNFj6p+jSyxTOr 795p50Sm14ktcS6SSmYZdujuQjVdU982KTHxB/ewMGv3qz3sPImm6xN5kCXbRAABYRzBzr hg4gumtxA54X5isOHrJE1zFduar2Snk= ARC-Authentication-Results: i=1; imf03.hostedemail.com; dkim=none; dmarc=none; spf=pass (imf03.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=1692589799; a=rsa-sha256; cv=none; b=LhCkUuDJzjcAEXTOeOcnb6ej5mHzbhD5eJH7OAyLdgd3Ht/btYKUk5jizeZwLqkQRHbn7o dQCIor/Dp32dNtfab+RrNNUy1WoP8UhaTu8QpAmtYuYP86NhDuYHJ6qhFY22EDs+W3m1gb U5gdTCwawV2KFALfpmhaKnnmX+tYxO0= X-AuditID: a67dfc5b-d6dff70000001748-2b-64e2ded67c1d 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: [RESEND PATCH v10 20/25] dept: Apply timeout consideration to waitqueue wait Date: Mon, 21 Aug 2023 12:46:32 +0900 Message-Id: <20230821034637.34630-21-byungchul@sk.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20230821034637.34630-1-byungchul@sk.com> References: <20230821034637.34630-1-byungchul@sk.com> X-Brightmail-Tracker: H4sIAAAAAAAAAzWSXUxTaRCG/c7Pd9qu1WPVeBSNptFoFH8jZqIboxe7fHGzcRNijHgh1Z5I YymkKIrRBKWwCJYFXagiurWSUqEKHjRREKkoKBq0lgarwQqFoI1AFS0rUH8A483kyTszz9yM jFbVsnNkOsN+0WjQ6NVYwSj6J9uWP/cHtKteNyig8OQqCH/KYaC0yonBfbUSgfP6MQqCTbHw fKgPwWjrUxosRW4EF7te0XC92Y+g3nEcQ1vPFPCGQxhaivIwZF6qwvDsXYSCjuJTFFRKf8Lj AhsFruE3DFiCGM5ZMqmx8paCYXsFB/aMRRBwlHAQ6VoNLf52FupfLoOzFzow3K5vYaD5ZoCC ttpSDH7nNxYeNz9kwF1oZuHKgA3DuyE7DfZwiAOPy0pBtWlMlP3xKwsPzC4KssuuUeB9UYfg Tk4nBZKzHcO9cB8FNVIRDSPlTQgC+f0cZJ0c5uDcsXwEeVnFDDz98oAFU0cMjH4uxZvWk3t9 IZqYag6S+iEr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wk0egYwlNuyKfh1pwmB68IgC8np4yxcP30BQVryFRqe/37EgLErBLw/88i2zWLjwDAl GsvjxbpREy0+KRDEqtxuVjQ+7GRFk+2EWG5ZKRbW9mMx/5uHEW3W80S0fbvIiqmDHVgcevaM FR9f9dKiuyMH71p4ULZFLWk1cZIueGu4LMo0MszEVrInb/Rrk5CRpCI/TuDXC+60X9NM+GXC mzfj1BT784uF8owPTCqScRR/dqZg+do6PZrL7xPsmRn0FNP8UsF3q4mZYjm/Qai5VMP8ky4S isrs0yK/ydxWU42mWMGHCCO9fXQmkpnQDCvy18TERas02pDV+iNRCTGak6sjjkbb0OTPmBMn sh6gH+3bGxDPIeUsefhCl1rBqOL0CdENSOAopb88cKxXrZCrVQmnJN3RMN0JraRvQIEcrZwv 37FfClfwkarj0hFJipV0/1vM+QUkIe3NznWaFfowXLogdA7O15xnIuo/FHqftu59NSfu58ay keDMzqrYxMOo0hHwJD03zNd3KGWu0pdcYS67e1m3ccumU1pF/SUv4axDiZHqJRFs8L4St8+5 ZwzdGmgfY+LVVsOx3fKIQbL8fVCV84DF0Fc9LzC3aWbYjHqtewkfqqT1Uaq1KymdXvUXeHEZ NS8DAAA= X-CFilter-Loop: Reflected X-Rspamd-Queue-Id: D7A0D20009 X-Rspam-User: X-Rspamd-Server: rspam02 X-Stat-Signature: i56uz5au35mmig5qnb8jfh74cqww8duj X-HE-Tag: 1692589798-967571 X-HE-Meta: U2FsdGVkX1+W1IKcpr4qt03LSWYw9snSZiw7FPal1Sk9dq5wZgnQTnvWjfCK/+h2lpGr8+mGs6uhhJix2fEF9RKGATyLHHV/wQPJq8VtMHA/zy+nHjjBvmbBiRvGu4kmFS2pGU2jj52d0nTu/9Q2jziFCtcTKJMXrbx+x+3+/EqvXfTn0D5Oo64/BWYuIilYvB0KnBq3+OjRxD2mQLux04NKZ5gkFkBC2iqB4UTY7f2TiVyihUjaVVEgOncNvy/RgaRHispzLdFDmeaKtCL5i+66YwuQiA691rKE70PaUamVEd9tegGHXkugUl8RX7276c8xdG++mXwovFPL6uyDg0b7OiKSQnLOJp4yfDnK7WublhTOXt2Fehi0qEtkdNdmvuw1+AiYXTLui3Zw49OfsZhKFzzAZzFNEegTtUg8mRva3qQRTFF7eQyrxX5U33JTOVvvSvhIL5a3+buNu3n5Zqlzd+6YpkezXsgna4qNg6POYjL4k/kAlk9RKf5ym4RU6HxzYfI/kzZhMIMI2adBWFxscHfwdGsumq5BtIALTHyxjzkjPUJtNa6+hnOb7naCb7rjZ68BBOaWQvt5hfAk0Qo2eF2YTYouaZ8uYl2YW7EAzFKJiR6s8gvyvC3ckHpMeDjC9R5c/Bvgl+MjiR7HNutotla4A9gOk8bxWNPs8HxIrqG9txHH/vnAYZA49nAMPJszbKZ429CbJFQ9IcdyGtG0GbMNn+yLngoobuxY/yKqDAIazSStHSgvt7ZxJJgrXsCthCwttVpoKS2GdiF0qXtS0JYIxg/hVrnO3VfWtsm/Z+GpmXidPQvYZUWUPIXgOpWR8Ersk1POYEHEjnm+77c5br44x66Pilbvt1rmGFxGUHNHFhhHJIfhf3qjXtRsyH/hWzFEI8xxg7RPWPsgSyfmW4TFukW57fMuRYsaI+gWgwb20lI8Fo7pjuHZgxJbV/YahOTp5he3+C42v/M WIH0zswm 1FJizbF7XIQuJ94N1slgu9B529L6O0Do5oBCoA1Uksu8DDZP16Mr7cKTzplpv+POV+3BB 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);\