From patchwork Wed May 8 09:47:16 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Byungchul Park X-Patchwork-Id: 13658338 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 2AC5CC04FFE for ; Wed, 8 May 2024 09:48:26 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id CC2486B00F3; Wed, 8 May 2024 05:47:57 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id B7A806B00F7; Wed, 8 May 2024 05:47:57 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 8863B6B00F1; Wed, 8 May 2024 05:47:57 -0400 (EDT) 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 66F236B00F5 for ; Wed, 8 May 2024 05:47:57 -0400 (EDT) Received: from smtpin28.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay08.hostedemail.com (Postfix) with ESMTP id 1EACA14068B for ; Wed, 8 May 2024 09:47:57 +0000 (UTC) X-FDA: 82094752194.28.BA58172 Received: from invmail4.hynix.com (exvmail4.skhynix.com [166.125.252.92]) by imf10.hostedemail.com (Postfix) with ESMTP id 46FB6C000E for ; Wed, 8 May 2024 09:47:54 +0000 (UTC) Authentication-Results: imf10.hostedemail.com; dkim=none; dmarc=none; spf=pass (imf10.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=1715161675; 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=WEkeFH4ZkPzc3oy+9xl9QjtGJXLvY4GGMhoqCUeV+Gs=; b=xDcvYpAx+g9bh1lUiF3IP9K+hBgBW7FMvsKTmHgyDTDXEgmk2f5WO8RZnlWtDEUVLlKJXV 0kS4q//jhyQaluFTEGcxqhxfHzj1TAWPe5mzjNQoR+Fvs3CiM2LHEwZtH6tp8jrkmTllU+ 6y8sDgXYQUZr8FhaWQVf3z49GH/qT8A= ARC-Authentication-Results: i=1; imf10.hostedemail.com; dkim=none; dmarc=none; spf=pass (imf10.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=1715161675; a=rsa-sha256; cv=none; b=YkanhR5pGewv9I2tZHP4LFemNminK5l/7AdD2ZcELxn7Amy/+rG/xsEwG5FnsNExYThe08 gjW7YJl/Gk2IsH9ANVckNeUYvDhQii0xhqkZghPH+itM+85oeg7ZbOABAFuM/YGbNaPLEi KKKH7K/6Is7qPTl8DMw0BnTvH8gCSlU= X-AuditID: a67dfc5b-d85ff70000001748-48-663b4a3a9bc8 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 v14 19/28] dept: Apply timeout consideration to waitqueue wait Date: Wed, 8 May 2024 18:47:16 +0900 Message-Id: <20240508094726.35754-20-byungchul@sk.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20240508094726.35754-1-byungchul@sk.com> References: <20240508094726.35754-1-byungchul@sk.com> X-Brightmail-Tracker: H4sIAAAAAAAAAzWSe0hTcRTH+/3u3b3X4eS2gm4aPUYRGJlG2ulBVFJdoidB0ENs6bUNn8xX FoG6ZeZaWGGWWajVXG69NnuoadPwscRHbZSaSa2HSVPDmriUalr9c/jw/R4+nD8OQ0grRf6M MiFFUCXI42SUmBQP+pYuXbN1TUywts4Xzp0JBvePXBKK75oo6LxjRGCqzMIw0LgFXo+6EIy3 dRBQWNCJoPT9WwIqm/oQ1BqyKbB/9AOHe5gCW4GWAvX1uxS8+DqBoffieQxG83ZozS/DYPX0 k1A4QMGVQjX2ji8YPPoKGvSZi8BpKKJh4n0I2PpeiaC2ZwlcvtZLwZNaGwlNj50Y7NXFFPSZ fougtamFhM5zOhHcHiqj4OuongC9e5iGl9YSDPc0XlHO918iaNZZMeTcuI/B0V2DoC73HQaz 6RUFz9wuDBZzAQE/yxsROM8O0nDyjIeGK1lnEWhPXiRB0xsK42PF1PpV/DPXMMFrLOl87WgJ yT8v4/iqorc0r6nrofkScypvMQTy158MYL50xC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rsOi Z9hKi89LBfFxcScrGqvbWdHqPCS6yuaLN5/2Y/HGUIgRnfZsIjqHClgxZ6AVi4PNzazYeGmU Fj+0WvC2qF2yNQlSsiZd0i1eGy9L+tjmRQcr2SPvLlyiM5GR5KAITuCXCy15pXSYCT9HePt2 hApzJD9LcJk/MWGm+IBMuNW8MQdx3BR+q9Dk3xGuaV4lVHjf/9XI+RWCyfyQ+qecKTju1/zl iPG+rXcQhVnBxwhVhmI2D8msaIIdRWq06SlqTXLMIv2BpAyt5siifakpTjT+FtuJsXw3+ubf VIt4Diknyn0kNlHBqNP1GSm1SOAoZaS8/szKRIU8QZ1xVNKl7tEdSpb0tSiKo5XT5Jt3SvEK fr86TTogSQcl3f8VcxHTM5GKy+qz9q7/mW6pjI+zvnhkPtbpru5WOUh2x8vZHndFmmP7blPu ZBP7farheyhbtzNKlRulDzhbqrRNmcaqPubysDRUEhOyB32LUVzBhHlDM1ZVuk6k+YuPb/B3 R7cvu7BDTV9MqMyde3hv4+PUbPu2mX0De/Vfg49wXNvnX24lrU9SR8+ndHr1H7XhvnMpAwAA X-CFilter-Loop: Reflected X-Rspamd-Server: rspam07 X-Rspamd-Queue-Id: 46FB6C000E X-Stat-Signature: arkn4gbxu1x1du9gqu3snzo53rcrqf6c X-Rspam-User: X-HE-Tag: 1715161674-326263 X-HE-Meta: U2FsdGVkX18kzkxM4PVJ25+7lFgEqxl/uFVmUVz+zviEW6GivnaDZOXwitMdhB0XJt7+hPXC4RroEadiz1Kf1Kc5bxJ7m7zK60MHN8jl2jMI9Qp5nD31BO8LPhte4lBTy62zww4sZZDintpDTYEYrRaENvEBvbsi3L70a4+nbRKI7N3lSFagVksBgo/dciupfmM14Et4QeNPMD61OLyJf6Su7l2XvZxb2zDgi+qzKtVU9JKvyyvvRU+WftoYIvSr9xQaMlhwJcBwqJe4forSt1zyeIvOFc6GoZUdQiS+JK/KgnsTfWHbKsM2NG/hrzptd6wT07U4zWhTiqDIKDGNXKPA9dTyevry4z0eVcqXZG+r1rPYOS/55rApwAOc89bvyf7OKGucCWxl8uKqLpvPjYELEoRgA9XmesPCPQ7VRoo9QTGR53lJzXwGrmMhGyWStm/UdB1+z96foVJ4i9p3prBAfJ1+pDRrrustsjYRhRd4xnIYb+mMbpexwI5jYLFN7ierd5S61TsOZoX7n4hH038evXgogVNVI9RcviKHDztC3Rg5KW1s663u+xiGtcR+zkaOiRkhUlsKB2jSZiMo25iTtQ4dLIUqVSIk0VWm5W/Rae8yLxUxXsnX153ea3FpV/HAxJPwDwbiqPfKYfAhvEQ8J4e9ipOx4Aen0lVZm6YaIWUC2q9nC3sLBWaoezIbD1DknLBlVCPPCxHDpqsatstsi9XYcTK3o3+dfc6Ejqm5+idTfrlFW22ts6RpD1pYRKQJoieftPeG2U2K6VPXkBExONVz/cxtwz0rMoGUr7DW6/XWTdqgq+6d2DCephFbSRgxbSIcHKz10xVAuzbxzGuUdo/kOk2BrRs1z/BT0A8eBngFPtJhf43GFLEfXk6njVUSjWXk71wyRpM9M0CR0wD8MCa5K6N/5iVCZPCPQiLzMjy0OonTnsxhyWsFXkiP6Dtn7arX5HsZM1KmoPp nT9qdIg+ PwxT5p8dkk1HHdweMok7p2BalzVGOy6PWFmPyTLQ1NnMV1rJde6+DK6J27KbFHWnovT/y 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 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 3177550a1b42..0bc7720273c8 100644 --- a/include/linux/wait.h +++ b/include/linux/wait.h @@ -303,7 +303,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);\