From patchwork Tue Jan 31 08:39:39 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Byungchul Park X-Patchwork-Id: 13122437 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 721CEC38142 for ; Tue, 31 Jan 2023 08:40:15 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id F261A6B0089; Tue, 31 Jan 2023 03:40:02 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id DFF5A6B0087; Tue, 31 Jan 2023 03:40:02 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 6FD646B0088; Tue, 31 Jan 2023 03:40:02 -0500 (EST) 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 2B7E86B0087 for ; Tue, 31 Jan 2023 03:40:02 -0500 (EST) Received: from smtpin28.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay08.hostedemail.com (Postfix) with ESMTP id F3D641405EB for ; Tue, 31 Jan 2023 08:40:01 +0000 (UTC) X-FDA: 80414446602.28.6A72447 Received: from lgeamrelo11.lge.com (lgeamrelo11.lge.com [156.147.23.51]) by imf16.hostedemail.com (Postfix) with ESMTP id B40FC180005 for ; Tue, 31 Jan 2023 08:39:59 +0000 (UTC) Authentication-Results: imf16.hostedemail.com; dkim=none; spf=softfail (imf16.hostedemail.com: 156.147.23.51 is neither permitted nor denied by domain of max.byungchul.park@gmail.com) smtp.mailfrom=max.byungchul.park@gmail.com; dmarc=fail reason="No valid SPF, No valid DKIM" header.from=gmail.com (policy=none) ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1675154400; 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=ooQM6sVKv/AbGeYgDV1oAafMBNKP6iHIYrOBZ5wL7lw=; b=KMrbEt7DAI8AaDBINEv6OE4Yg52cVBItaVQGdD5wfZy1Mankei9QoPOdn4F1QDdLRKGt9e fQz9i5kZAz7DQvgrcDxg+/I+G9ndQKBW63Yi2aCwz0cg03NAwEWUffPG2riiGH9omL8WIA 72x00ZXIWsKsjIa6mqiI9OSg6H386cc= ARC-Authentication-Results: i=1; imf16.hostedemail.com; dkim=none; spf=softfail (imf16.hostedemail.com: 156.147.23.51 is neither permitted nor denied by domain of max.byungchul.park@gmail.com) smtp.mailfrom=max.byungchul.park@gmail.com; dmarc=fail reason="No valid SPF, No valid DKIM" header.from=gmail.com (policy=none) ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1675154400; a=rsa-sha256; cv=none; b=JxU9CAAD1u/qUHVWMY/XkGmAt9bxocCh1/vTrOAku5AwKeGa2fAY29rcSu4so9+h/GWGAi 3V9R+rY18Et4DbN9ZlLQKc5+PkDqlrh3QUkZNjYaWM1PCs0U4UX2lUQztZFgz+xZEYn7Hy TWqUgGLzv4p7fVVv4SHdPrBvYpXOk+8= Received: from unknown (HELO lgeamrelo04.lge.com) (156.147.1.127) by 156.147.23.51 with ESMTP; 31 Jan 2023 17:39:58 +0900 X-Original-SENDERIP: 156.147.1.127 X-Original-MAILFROM: max.byungchul.park@gmail.com Received: from unknown (HELO localhost.localdomain) (10.177.244.38) by 156.147.1.127 with ESMTP; 31 Jan 2023 17:39:58 +0900 X-Original-SENDERIP: 10.177.244.38 X-Original-MAILFROM: max.byungchul.park@gmail.com From: Byungchul Park To: linux-kernel@vger.kernel.org Cc: 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, paolo.valente@linaro.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 Subject: [PATCH v9 10/25] dept: Apply sdt_might_sleep_{start,end}() to waitqueue wait Date: Tue, 31 Jan 2023 17:39:39 +0900 Message-Id: <1675154394-25598-11-git-send-email-max.byungchul.park@gmail.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1675154394-25598-1-git-send-email-max.byungchul.park@gmail.com> References: <1675154394-25598-1-git-send-email-max.byungchul.park@gmail.com> X-Rspam-User: X-Rspamd-Server: rspam03 X-Stat-Signature: 85krapoj3ow45dy9uin6cypfxm3qkd7r X-Rspamd-Queue-Id: B40FC180005 X-HE-Tag: 1675154399-719539 X-HE-Meta: U2FsdGVkX1+/uHgf4JzH3oim4T2zOBQKSzr8RisJ2+4lc+FStBOzKYHYxoVnPG19YErTGPlnUnRFHoJCwrj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+senXZ+6TmfvbjxXgl+fnKNrft4tNKV6Y0eRZv+0j4kS2KKAckTaCUU+frOT/TFadddAedLpacWx1AaAJhXnUjte+/CnW72gfsoka3+HRa6FFwIy28BkUwEMkionNhGgweCOqmYz70xyVQqouKKx7fOS7AMW/yd0ZRTKVPEWAljwBzJr+L5msZV07zlD+XOaRYMTUj6tNbHZ2TuQiY1BErn+jmBROZWfT4iFw== 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: Makes Dept able to track dependencies by waitqueue waits. Signed-off-by: Byungchul Park --- include/linux/wait.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/include/linux/wait.h b/include/linux/wait.h index a0307b5..ff349e6 100644 --- a/include/linux/wait.h +++ b/include/linux/wait.h @@ -7,6 +7,7 @@ #include #include #include +#include #include #include @@ -303,6 +304,7 @@ static inline void wake_up_pollfree(struct wait_queue_head *wq_head) struct wait_queue_entry __wq_entry; \ long __ret = ret; /* explicit shadow */ \ \ + sdt_might_sleep_start(NULL); \ init_wait_entry(&__wq_entry, exclusive ? WQ_FLAG_EXCLUSIVE : 0); \ for (;;) { \ long __int = prepare_to_wait_event(&wq_head, &__wq_entry, state);\ @@ -318,6 +320,7 @@ static inline void wake_up_pollfree(struct wait_queue_head *wq_head) cmd; \ } \ finish_wait(&wq_head, &__wq_entry); \ + sdt_might_sleep_end(); \ __out: __ret; \ })