From patchwork Mon Jul 3 09:47:46 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Byungchul Park X-Patchwork-Id: 13299836 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 04E98C0015E for ; Mon, 3 Jul 2023 09:50:26 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 890308E00B5; Mon, 3 Jul 2023 05:49:59 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 7A5578E00B2; Mon, 3 Jul 2023 05:49:59 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 644A28E00B5; Mon, 3 Jul 2023 05:49:59 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0012.hostedemail.com [216.40.44.12]) by kanga.kvack.org (Postfix) with ESMTP id 55D8B8E00B2 for ; Mon, 3 Jul 2023 05:49:59 -0400 (EDT) Received: from smtpin22.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay02.hostedemail.com (Postfix) with ESMTP id 2CF1712088B for ; Mon, 3 Jul 2023 09:49:58 +0000 (UTC) X-FDA: 80969829276.22.F32C242 Received: from invmail4.hynix.com (exvmail4.skhynix.com [166.125.252.92]) by imf24.hostedemail.com (Postfix) with ESMTP id 3186A180007 for ; Mon, 3 Jul 2023 09:49:55 +0000 (UTC) Authentication-Results: imf24.hostedemail.com; dkim=none; spf=pass (imf24.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=GVu9evvztfteD0uC8OS35NYTBgjDrGL/ofWfYToOkoc=; b=iWKFM3mDjUdv8GwrsnfcfD+kul8xCZFfL2Cjz+Rl6i/mAbKxOWjd5YRzsKL1pioR6Gtirm wMvV9Ju8vgaN09ZqorYQsvGloJD8evkeWl18L8+SF5OQMXRgoa7ENdGMq+zYoyAHj16dfo dhgys7f3+M56AvzraaJsy6Z/yhM/bjo= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1688377796; a=rsa-sha256; cv=none; b=sTlYvbxrONf1H30QWoZFtgolctvX90TUzU/2rch3tqh9JLEtIqgQGOOX3Dby0PWRaqfSv9 9R/+zKc2+zLg1+FzNwHiW1Hfk8w24I5Y8F42kgTYm6VRzO/JvKMqPNIJgg02HMVN1pBZ/e JY8Vm0nCYiOaQFkZ7ETyMCmICH73GKs= ARC-Authentication-Results: i=1; imf24.hostedemail.com; dkim=none; spf=pass (imf24.hostedemail.com: domain of byungchul@sk.com designates 166.125.252.92 as permitted sender) smtp.mailfrom=byungchul@sk.com; dmarc=none X-AuditID: a67dfc5b-d85ff70000001748-0b-64a299b42e6c 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 19/25] dept: Apply timeout consideration to swait Date: Mon, 3 Jul 2023 18:47:46 +0900 Message-Id: <20230703094752.79269-20-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+5/L/8zl6rQunooujKIosowubxIVfajzoUKICKyo0Q65nFO2 XJlFmlt201Iwr9S2ai1dWZuEXRRTNHV5KUeusKXSzbzFbKM5u0yjLy8Pv+d5n0+PiJQ+oeeI lOpjgkYtV8mwmBIPhptWVBSaFas6G+dDzuVV4PtxnoKSchuG9vtlCGwV6QT01W+HTv8AgmBL Gwn5ee0ITD3vSaho8CCosp7F0PFxCrh8wxia8i5hyLhZjuFV/xgBXddyCSiz7wTnVTMBNYEv FOT3YSjOzyBC5ysBAUspA5a0xdBrLWJgrCcKmjxvaKh6txwKr3dheFbVREFDZS8BHU9KMHhs f2hwNjRS0J6TRcO9ITOGfr+FBItvmIHXNUYCHuhDRedGftPwIquGgHO3HhLgevsUQfX5bgLs tjcY6nwDBDjseSSM3qlH0Js9yIDhcoCB4vRsBJcM1yho+/WCBn3XWgj+LMFbovm6gWGS1zuO 81V+I8U3mzn+cd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HT47zUJFXjKDw6FkW2j/c5sDakwTRd5Vk /RraNDzCUKvnN+qN2Fna6hDp3+WPeGqtf8hTu5xJPdVL6cWbg5hWjYY5KrsKCJVHT/P0xMsg pq/a2njaci7K0idBG94692flWp1k0GdJphXrdirTXvQl7w2R7Lz612wuauVOoHiFKPwg+odC U0yERWJ39zgzyQnCfNFT9CyWKxWMcGyaWP36LpksvhG2iV3RY1MjVlgohuwV/CSrhNViuN3K fpHOE2tqG6Y28bH86btiNMlqIUnsKeslp5DSjuJcKEFvzErX6g1Jy8170nKM+uzluzLSZRT7 GefvEyXX0VjHpkYkKJBmuqr7YJVOzWmzzDnpjUhUMJoElaX/gk6t0mlzDkimjB2mTINkbkRz FKxmlmpzqrRTLfyi3S/tkaS9kulrixXxs3PR7ju1HxKWuf6yrQvc6zx86H3J+u1zpxe6C8rO 7LtiWZUv290RHKno8jQt2P3WZ1hM/PRB0v+LzwxuPKL/7ttZvz5bknkw23u+ZXvKqDG1IIUU /dh3//CiaNyWunzHjA3FGQUzbcn/hqIGZ7zc6nrTtqH8bdzET8FyP3shPLzixtjjRA1rTtMm LmVMZu1n8BLdTi8DAAA= X-CFilter-Loop: Reflected X-Rspamd-Queue-Id: 3186A180007 X-Rspam-User: X-Rspamd-Server: rspam11 X-Stat-Signature: ptesscku13zxedkhu8fi8388cnjpogew X-HE-Tag: 1688377795-777882 X-HE-Meta: U2FsdGVkX18KuweqBe8V2i5eCcX4xPs5KkiCMS0minkTJ2lr4z0uiXImXytQ2tSluMvtPhwC86Lfocd3u5gqXIkiFvuMj841qvg/ZKWm0te6Qdpj+KvD/mwsWbtHEQ+iv2yQBJ5i39PU+W72dN+XdSWffUtt9r1pM9mMQQYGKcUDMGgcCURdkig9yC93Cq6NUNFpWxV+ubChFgBDnjT5wEpZ/HMN5/bpZr4V+r8manjtTC0b5cTDC02YA1AA5WyGWDt3OAkp+zJApu59DJlDJgSE4rfUzUgSS26kENWxJV7H0xWWcpzpI5Zk6JWudRdbEQCEMxbZcssu+mIlPTMgpz4uuwTFQis/rmuNX92jh8yKOUQE7zmTF5SAIDznHTvwwX/9ysWdipnkEBzMVQMI5AhKSRHMAerzv6XlRw4x534cliwHNhBDRpZ9w6cYv5WEfAl7RdUFPx9L9wFT9DnaewpdwxotQs6RhauOvoxuyQbqT5X4LTWaFrW0MdPfxhSlIbxwnWLD6gzi4Pt5piLL32hom4b1J2DAcO6f/Gyt9it2TFfIAWrkuWfMKuA/mlhJh4rT3LrjfupFFoqXo7UxGIwYs4l6AplfFP8LkmptzE5xCVA7PEIPVVrCZAqQR6HI88qr0eYRE5X2gzEKpSPWEGAy48x2f/DFA/15s4bi5Mdwv5JI5AQeJAKkJ1f3iMn6hhoTluGFO6Js+BvpVbZ3insup3pHeckQ6quKoUb2ioYRX9yzIWzWXuw1HLY1w0S4VPGq4fA9Dwta0kzA35zDRjqTEo80gjADX2QO5VnX7mv4jVwPGUDTVKQesXXgDGZINWN729lBgaaJL5Wyz5rn/IFGlNZRIRmgB3Cqx35/e3cDiX1gBqnPtQMbkoXgnBc4ZJ0B4PGH0j++CyG46OQApx8Y2LWVH/j6ldLFV3twXBqnOpMOAqL3NA72JqMumnMMj9bG9/NC4Zo0rvCDfvQ oVZ5JMQ0 0yWwo4kMCakEr7jNenngrXAyRHys+roGMLaUO+++X3A9cO2ob86DcWTeHSiXpVF8qNIdT 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 swait, assuming an input 'ret' in ___swait_event() macro is used as a timeout value. Signed-off-by: Byungchul Park --- include/linux/swait.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/linux/swait.h b/include/linux/swait.h index 02848211cef5..def1e47bb678 100644 --- a/include/linux/swait.h +++ b/include/linux/swait.h @@ -162,7 +162,7 @@ extern void finish_swait(struct swait_queue_head *q, struct swait_queue *wait); struct swait_queue __wait; \ long __ret = ret; \ \ - sdt_might_sleep_start(NULL); \ + sdt_might_sleep_start_timeout(NULL, __ret); \ INIT_LIST_HEAD(&__wait.task_list); \ for (;;) { \ long __int = prepare_to_swait_event(&wq, &__wait, state);\