From patchwork Mon Jul 3 09:47:48 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Byungchul Park X-Patchwork-Id: 13299837 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 4EBC0C04A6A for ; Mon, 3 Jul 2023 09:50:28 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id C39BB8E00B6; Mon, 3 Jul 2023 05:50:00 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id BC3168E00B7; Mon, 3 Jul 2023 05:50:00 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 9EDB18E00B6; Mon, 3 Jul 2023 05:50:00 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0010.hostedemail.com [216.40.44.10]) by kanga.kvack.org (Postfix) with ESMTP id 8AEB38E00B2 for ; Mon, 3 Jul 2023 05:50:00 -0400 (EDT) Received: from smtpin01.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay08.hostedemail.com (Postfix) with ESMTP id 5BCA314071E for ; Mon, 3 Jul 2023 09:50:00 +0000 (UTC) X-FDA: 80969829360.01.7F4BDCF Received: from invmail4.hynix.com (exvmail4.skhynix.com [166.125.252.92]) by imf18.hostedemail.com (Postfix) with ESMTP id 60D461C0009 for ; Mon, 3 Jul 2023 09:49:58 +0000 (UTC) Authentication-Results: imf18.hostedemail.com; dkim=none; dmarc=none; spf=pass (imf18.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=1688377798; 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=09EUZJPmXW7lOZvbeu5TNUPkzhdC2Dat/aeOn/0RYwc=; b=BVSEbAFXS3/CVk6E9Wk7bVDBSOeMyvNckzuthvA6TjXebRotrldfegQHZD3YTLR2BahHP3 vhitHWa6bmXuuffZDu7ipswBsSZXG8tvUEXp/bIJrYrUCZ1Yx2hEfPoP0SUsfi9jHInnAa 6xSVoyNpzMt69+5SRGvOmnfg4mQHyEA= ARC-Authentication-Results: i=1; imf18.hostedemail.com; dkim=none; dmarc=none; spf=pass (imf18.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=1688377798; a=rsa-sha256; cv=none; b=AjvzkDChlSwQf9QS75mYN/PzeR55oRjGy7x8Swz48oHSPENnbTeey8EJUOV1KUJmc9tE9z pbkXxUzP44Bqv+bVb25tUHhcvGPik6deLyMNA2xHzksq+0Pa18yY0Z1v/DBfc6b2hlvyK0 5/AfF9+UdPe9cleh3KvDJm/tFjze7ZU= X-AuditID: a67dfc5b-d85ff70000001748-2b-64a299b4f274 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 21/25] dept: Apply timeout consideration to hashed-waitqueue wait Date: Mon, 3 Jul 2023 18:47:48 +0900 Message-Id: <20230703094752.79269-22-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: H4sIAAAAAAAAAz2SbWyLaxjH3ffzulp5UhMPEi9N5MQwnHByEcQH4UYkEt+OBE/0OdacbpPO ZiOS0WFmq5l0tTdbi55mqzOn25wdNme2dMyMOqsp68q6HSz2IqOjNqMlfLnyy/9/Xb9PF0+p rjOzeG3iAVmfKOnUrIJWDEZbl9QUWjXLJlyL4WzOMgi+y6KhpMrBgvvPSgSOmqMY+l2b4PHo AIKx9gcUmE1uBJaebgpqWvwIGuzHWOjomwKe4DALrabTLBguVrHw8PU4Bl9BPoZK5zZoy7Ni aAy9pMHcz0Kx2YDD4xWGkK2CA1vGAgjYizgY71kOrf5OBhqeLoLCCz4W6htaaWipC2DouF7C gt/xmYG2ljs0uM/mMnBlyMrC61EbBbbgMAf/NZZjuJoZFp14O8HA7dxGDCcu/YXB8+QGgptZ zzE4HZ0sNAcHMFQ7TRR8/MOFIGAc5OB4ToiD4qNGBKePF9Dw4NNtBjJ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w/+w8GZ9soAXdoBkOXs5qC95dvIZi0vGbh1IUIC/WlFgTlp2poGPpwmwGTPx0Www1k 13bRPTNHiaauo2LvgpUW79oE8c+Lz1jRdH2cFa3OI2KXY4N4yRXEYtPbECM6W84R0fm2ihXP v/ZhcfbBA1a888siLU75avEPSQdkOzRSrrZI0m/+JkuWfc/Yjgos7LE3fjMuQRPMeRTPCfxW YdA1hWNM+PXC2FiEirGSXyN0maejGxlH8WeWCY4390msSOAlYdIdpGNM88lCdaApmnOcnN8m jJUpPzu/Flo7+v7zxEfj52ELirGCTxf8dQFSgWRWFNeClFpdUZ5am5ueYsjJLtZpj6UczM9z oujP2E8uVfag+ZE9/YjnkOoL+djxJo2CURcZivP6kcBRKqXcOPGbRiHXqIt/lvT5P+mP5EqG frSKo1Vfyb/bJ2Up+EPqQilHkgok/f8t5uITS9CgOeHb3esG+CthOqxu3PLji/dlB+JqtP22 HRnj7lCpJ+Nd5Zf6ly3L/z7DVeXPFu6+TDL8hx+dWPLtX1Fmmd572GY7lzK+4pq9NOnKqqGd /pHUlfFh02rv2uEbQVf3FrbZmjR8VfO0omB1TkJmeUdkaufNE4mu1NFpHbNV71C6O1W0IVud toHSG9T/AuhAtaAvAwAA X-CFilter-Loop: Reflected X-Rspamd-Server: rspam09 X-Rspamd-Queue-Id: 60D461C0009 X-Stat-Signature: yn4kngb5s6stbyznmeh1pzzqexs5xmdm X-Rspam-User: X-HE-Tag: 1688377798-779490 X-HE-Meta: U2FsdGVkX1/9MwEXswSs1MvfHL/Opnvzh3sLxz9RfCPdkteBRPdnRDXD5RBhldVgjWm0KcEc/348pETjFQg3RFUQIgvUYwr82aPPr/To9wZzWWkuodCwqepsPK8E5Z5cAxyF0PKWoZ4cQwjzU0PDaKTLoQzrN9GJNrfN4DaFAnuhwgUWMO/wzr9pblofDh+KvneRvc8II/kDC32c6zpqDi5aqHYpMwVOqEzIO7sq4nHLLAyz2t1ClLgkU6q+7fFsYuNCckjK7xXqOT/QXsZX9R8iezvBXDicyGesvDS1E4X1+xS7oSv9KzkLIeckYMXrx7NzHnxjM7KGXT1jGwM1SEwkpP4xcWZ0CKb1d+IFOoHh3s2xF4DVhv7TxVs4pJ/2fcOQs03fbkRlgOJ4Hftd6lDaUqrjBJqvHDvjI75zf/oiAjvxxECRFmv5J777iKOdzbPtZhjPiHeojflProWI84ouk1iieX3NXgtO1eBw45pfcN4uJIJYuZEH6e8sljTmt6teRbAWkfIwt73xS347+1o/IlATg9+cToB0Z02ZsHOQ6BhRAWcByoUQOchQ6FKmdqPjPmPGp2akFCE/pU9gasFzzC2k9ecH3varJ8kkuy7d4zQCJxYd3vKyF3Tpznj6siceSKzb57tPh8x3DnOZdODFUlI/SiVN6HDjwlTJvh946yJRdt6nzuxxkcFP10QcXiFcGafndpJfV9wrfaOi9hHQLjWKbFyVOy8cPqTPNbGe2Taxk2mjU1JmpX5mmxnYaqH3Ki/0VAdl93c4kPQhGrzopOGLn+Z/bTb6N5YNhEExnvYfyOxCg02VwzyqaE3Pvoxe06x+62yDKpJiwQHZdIHeEJbYOTagMSCqfOZ4kEV+CBfBoc/m3/AR7+MhC5oxXS/CJweGopTSaI5aY9wqX3CxkwS3C4AA3ikWYjCN1ZjyJ2OyPrDRzzCu+8ChoJhnepaKJGcBazjf20mPKwJ wlTEp21O lOyV6OaYj13ASFrQPHHe9g0ui118AmrQ1CB0w+xUJYwQAB664A0mu9MllcNiCqQhLwJ8Z 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 hashed-waitqueue wait, assuming an input 'ret' in ___wait_var_event() macro is used as a timeout value. Signed-off-by: Byungchul Park --- include/linux/wait_bit.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/linux/wait_bit.h b/include/linux/wait_bit.h index fe89282c3e96..3ef450d9a7c5 100644 --- a/include/linux/wait_bit.h +++ b/include/linux/wait_bit.h @@ -247,7 +247,7 @@ extern wait_queue_head_t *__var_waitqueue(void *p); struct wait_bit_queue_entry __wbq_entry; \ long __ret = ret; /* explicit shadow */ \ \ - sdt_might_sleep_start(NULL); \ + sdt_might_sleep_start_timeout(NULL, __ret); \ init_wait_var_entry(&__wbq_entry, var, \ exclusive ? WQ_FLAG_EXCLUSIVE : 0); \ for (;;) { \