From patchwork Mon Aug 21 03:46:23 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Byungchul Park X-Patchwork-Id: 13359065 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 9B90AEE49A6 for ; Mon, 21 Aug 2023 03:50:10 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id AAFF094000E; Sun, 20 Aug 2023 23:49:54 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id A12EA94000C; Sun, 20 Aug 2023 23:49:54 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 83D4794000E; Sun, 20 Aug 2023 23:49:54 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0014.hostedemail.com [216.40.44.14]) by kanga.kvack.org (Postfix) with ESMTP id 6393C94000C for ; Sun, 20 Aug 2023 23:49:54 -0400 (EDT) Received: from smtpin27.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay02.hostedemail.com (Postfix) with ESMTP id 4854F120257 for ; Mon, 21 Aug 2023 03:49:54 +0000 (UTC) X-FDA: 81146733108.27.FA90522 Received: from invmail4.hynix.com (exvmail4.hynix.com [166.125.252.92]) by imf03.hostedemail.com (Postfix) with ESMTP id 052CC20009 for ; Mon, 21 Aug 2023 03:49:51 +0000 (UTC) Authentication-Results: imf03.hostedemail.com; dkim=none; dmarc=none; spf=pass (imf03.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=1692589792; 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=z7OkeT6xvSEqQwLdFXJGyxH34kbodoT4wnSvM20EAlw=; b=bz4y/N7pOz6Axo7dNikydlGB7Y8kEQ3RjQeYNSPgi7+JI6+T5snCTbSUWkEDztbJQNvvVJ E1olQWe4MEM8aBzsDeSBeiqJnZnJu0jtTq5gz0yWSi3PB8gbrXsv0TcNLHyxPtRus9PJtB nKpkZHG08MRAHWjZFipzs/FSSi3xVyY= ARC-Authentication-Results: i=1; imf03.hostedemail.com; dkim=none; dmarc=none; spf=pass (imf03.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=1692589792; a=rsa-sha256; cv=none; b=7zn0p+iQZa7M05tiXNz0k3LU5U+8722OD9Rnm5JaomqMdEbeMuLPe/ypLjBut+Q0mWZKUb 9tuP2vb5jEReRRuetciCpbDs5ncPjPxAzMjBGZ80sr7cFhaHPvVrFgGWwtA9At9WfeF+Qv 0oVx2uwemgDb2j8V9FxQQJHFihU/8Fo= X-AuditID: a67dfc5b-d6dff70000001748-9b-64e2ded5b3e2 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: [RESEND PATCH v10 11/25] dept: Apply sdt_might_sleep_{start,end}() to hashed-waitqueue wait Date: Mon, 21 Aug 2023 12:46:23 +0900 Message-Id: <20230821034637.34630-12-byungchul@sk.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20230821034637.34630-1-byungchul@sk.com> References: <20230821034637.34630-1-byungchul@sk.com> X-Brightmail-Tracker: H4sIAAAAAAAAAzWSf0yMcRzHfZ/fXR3PLuYhP29rTRE18ZmZ38vDZmw2I39wcw/d1OEiZTPR CSUqErnZVXZOXdKTWaprKf3SKDp1Uq27GqIfXC5Ohbvwz2evvT97vz7/fBhcVkbOZlTq44JG rYiSUxJCMuiTu6St265c9m4tpF9eBs5vFwnQFZkoaHlQgMD06CwG/bWboX10AMHYi2YcsjJb EOTYunB4VNeNwGw8R0Fr31SwOIcpaMxMoSAxr4iCV5/HMei8kYFBgbgNmtJyMahyfSAgq5+C 21mJmHt8xMBlyKfBkOAPdmM2DeO2EGjsbiPB3BEEt+50UlBhbiSgrtSOQWuZjoJu028Smuoa CGhJTyWhcCiXgs+jBhwMzmEaXlfpMXiodYuSRn6RUJ9ahUHS3WIMLG/LEVRe7MFANLVRUOMc wKBEzMTh571aBPYrgzScv+yi4fbZKwhSzt8goHmingRtZxiM/dBR61bxNQPDOK8tOcmbR/U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6Ih+5SPhgsZpxGczD5HQPdkGwlZA7Ew/qOMWr2Cb3GP4HyW +RDf5DUQ/JNKjm8oddB81v3XNG8Q03hzdTRf1TiM8RVfPSQv1uRRvPj1DM3nf+rF+M9dXTTf fn6c4N/1FmObZ2+XrFQKiap0Qb14VbwkYcihJ1P6mMOTjxpoHeqj8lEQw7FLOUuFSAaYYudy fX0+PMAh7BzOXPDe30sYnM2dylV/6fz7MINVcv0D+XSACTaKuzbaQQRYyi7jfGNl/6SRXG2d 9a8oyN+LlnsowDI2lhsdfEsUIokBTalBIark9CSFKjF2keZAgjZZdXjR3oNJIvKPxnh0Qn8X fbOva0Ysg+TB0vjZLqWMVKRrtEnNiGNweYg0/PugUiZVKrRHBPXB3eq0REHTjMIZQh4qXb9N iJex+xSpwgFBSBHU/68YExSmQ7mqJDZ1w50GZSnuNaz2llxtvG1cFfRgvrtfl7fVIY2caW4e qt07fUy3w7IrrSH8d3Dw0kdr7Ieu5O5/kDHv4fI9Cy6ZDAqrQV8SkXPslb3buTPC9nI7td5c oN0ZysyNS88zzLg+K3+tNsJR6LMwYdn1c8iFm+K65WcnI8O3uFtH5YQmQRETjas1ij8RsZMA MAMAAA== X-CFilter-Loop: Reflected X-Rspamd-Queue-Id: 052CC20009 X-Rspam-User: X-Rspamd-Server: rspam02 X-Stat-Signature: bdi47zqfc5gr6ya4i3bspci4k71rbdop X-HE-Tag: 1692589791-767104 X-HE-Meta: U2FsdGVkX1/u22Dwc7HO6ZuIxux/QXQnEBSqpIK06EJTC5dk0Hs4LKaJserWoMfk7OsXApYLOq3RUZOJkCToZcmdl0bCu60b3qle5ytsU7wc2lhlVp3Jaxdrycp6EtKgYhx8cGZeFkuYe/n/gNT/AhcuMqD/E+K536DxqXFUFtQd7+VKNbzJ+JHtZgazrVJBqK8UfFy7yT0OJdOZvMoFR1NRuiTKBLyCqEFKNqMltMawoDmI++bq9OQr0a/pbJUPXUE8voFGTiImGby6dy+d+11j+I0caduVpV0IpX1pgsFxum9w6Ru6Mz3imPkTP3uXP4QUIQSkleDFZcTPXUwODGhHsXWAutnNu6+A1owNIj5Y8hzeLTrNKx0SrobAPaOQ0uze5urrfws7cXvRuKI8VZkjKfIbupEocqv4J8/sV1JXdM+PFXS0wiDGvxWl4dIRjjLcMK0GT9ybNfbakk2uuso9/pXfdUTOfCBoI6WGcRGsEsmsaUJhhYKeLpEDG6PiDMH3+Gkj1U1bCo8aBWMjYm3YztO4ZTA2nX4N7a/CM9wbCtXGbIr5P8wkmn1k91Iz1js8M5NxRbpnNtAuzhL0Lpnjp7xHVI/seC5nn19QeqroJHEzRUOjdMMMXftG8nx6wu9W2lko9L2eWKa0a6EOT5xb2vX66SYZp+9kcJ+ffj+EoHxhprU1ZSz8MB6V6AzaDDV2V8vJobl62cugR94I40hZK9byh/awDI/jn1/36osDb2L4uLb+9ZXCK+36V8+Hd06B0Mpw4jw3294cyAK2DE0bs8pwNUFa9R4DG7CyPVSv0nTyyEEsGMRiwUizvlz0I7hBWThTJIcPBvhEvuH42IRfyqfm3dl+ASvllrqaTcArRKGaywadDYzX5p3YKcYFTgob4EDc9N1URh17wil2g5z64j2vOt+++Pt8Phu0IDGf7B+qQzScZyVFrrHCGPxS1Q9LbZqWUfXe3dfY2f4 JETpKP7t dvtqKIyESTDUAZk6W5JH9MMyp2dOHb2z1bhiQTEHQQRkJO1HrEKQ3kkAZmBL/bKbvNtHPd6+7J3B2L8IPJ07uzR45ptPsZpTmpnubfdemAu4DHUA= 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 hashed-waitqueue waits. Signed-off-by: Byungchul Park --- include/linux/wait_bit.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/include/linux/wait_bit.h b/include/linux/wait_bit.h index 7725b7579b78..fe89282c3e96 100644 --- a/include/linux/wait_bit.h +++ b/include/linux/wait_bit.h @@ -6,6 +6,7 @@ * Linux wait-bit related types and methods: */ #include +#include struct wait_bit_key { void *flags; @@ -246,6 +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); \ init_wait_var_entry(&__wbq_entry, var, \ exclusive ? WQ_FLAG_EXCLUSIVE : 0); \ for (;;) { \ @@ -263,6 +265,7 @@ extern wait_queue_head_t *__var_waitqueue(void *p); cmd; \ } \ finish_wait(__wq_head, &__wbq_entry.wq_entry); \ + sdt_might_sleep_end(); \ __out: __ret; \ })