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: 13299860 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id B7B3BEB64DD for ; Mon, 3 Jul 2023 09:50:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231448AbjGCJuc (ORCPT ); Mon, 3 Jul 2023 05:50:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50292 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231401AbjGCJt5 (ORCPT ); Mon, 3 Jul 2023 05:49:57 -0400 Received: from invmail4.hynix.com (exvmail4.hynix.com [166.125.252.92]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id E2A2618D; Mon, 3 Jul 2023 02:49:53 -0700 (PDT) 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/MOFIGAc5OB4ToiD4qNGBKePF9Dw4NNtBjJ9K2HsQwm7fjVpHhim SGb1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C95dvIZi0vGbh1IUIC/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 Precedence: bulk List-ID: X-Mailing-List: linux-block@vger.kernel.org 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 (;;) { \