From patchwork Mon Jun 26 11:56:44 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Byungchul Park X-Patchwork-Id: 13292917 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 D9EEBEB64DC for ; Mon, 26 Jun 2023 12:47:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231370AbjFZMrW (ORCPT ); Mon, 26 Jun 2023 08:47:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40730 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231383AbjFZMrH (ORCPT ); Mon, 26 Jun 2023 08:47:07 -0400 Received: from invmail4.hynix.com (exvmail4.hynix.com [166.125.252.92]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 4C04B19AB; Mon, 26 Jun 2023 05:46:04 -0700 (PDT) X-AuditID: a67dfc5b-d85ff70000001748-22-64997d6ca48a 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, 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, her0gyugyu@gmail.com Subject: [PATCH v10 09/25] dept: Apply sdt_might_sleep_{start,end}() to swait Date: Mon, 26 Jun 2023 20:56:44 +0900 Message-Id: <20230626115700.13873-10-byungchul@sk.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20230626115700.13873-1-byungchul@sk.com> References: <20230626115700.13873-1-byungchul@sk.com> X-Brightmail-Tracker: H4sIAAAAAAAAAzWSa0yTZxTHeZ732mrdmw7mCxI1TTqNi4BOyDFeE018P0g02cwWXKbN+iLd Cmi5iYkLl7ooF4MmpQgNwaIdoTiw1YhCkRUtIAoVEZEUJrCIKIhhtrEUxcL0y8kv55z/73w5 LCG/TUWwmpR0UZei0ipoKSmdWmperz15QR0zVh8J54piwPv2NAmm+joa3H9ZEdRdy8UwcXcP PPFNIgg86CHAaHAjuDgyRMA11zACR00eDY/+XQZ93mkaOg2FNORX19Pw8NUcBk/peQxWWzx0 lZgxtPrHSTBO0FBhzMfB8gKD31LLgCVHCaM15QzMjWyAzuF+ChyD38CFSg8NzY5OElyNoxge 3TLRMFw3T0GXq4ME97liCq68NtPwymchwOKdZqC3tQpDgz4oejnnwPDHfx8oaC9uDdKlqxj6 njYhaDn9DIOtrp+GNu8kBrvNQMDsn3cRjJ6dYuBUkZ+BityzCApPlZLQ876dAr0nFgLvTPTO LULb5DQh6O1Zgs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+3niEYvDTGwLksDwMFZy4hyDx3mYL2X000pLtCwfujEG+OEBpH J0gh3ZIkWKeKKeG5gRceXetjhPS6XkYoNicIlvJAobR2mBBKvrppwVxxEQvmr3mMkDHmJARX Vy0Wxu12Rmi+4qV2LdsviVCJGnWiqF238aAkyp7lYOJs7ImH1l46FbXjDOTP8twG3mb6SMww 5lbzPT0ecobl3Erekv2BzkASluRK5/BDzU+ZmWIht4Pv+J02O6C4AP5VX9esSMqF8Z6cvn/S Fbzpbv2syN+X17wwoBmWcaH8WVcDzkGSYuRXgeTqmMRopVoTulZ3LCo5Rn1i7eHYaDPyfY4x ZTq3Gk12RjYgjkWKudLg5VdUMlqZqEuObkA8Syrk0kU/9CqZVKVMPilqYw9oEzSirgEtZSnF Yun2veJBGXdEGS8eE8U4Ufu/JVj/Jano1J4jbc4nJrmf6svTPe8ipaex/UnHsuN+u29UJ916 u95u5J0F+w6POTSqi+FFYd1SpW4+tW1VCXpg+V6Vv2BiizdWP2dyG24LZAt/Hd26arzW+oiP 3v5ivvwxn+DdtzVQPbcnr3OvJORnkV11+mZQWPObAH2Q4fPqpk2HWoczN1YoKF2UMiSQ1OqU fwGlIlRlNQMAAA== X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-block@vger.kernel.org Makes Dept able to track dependencies by swaits. Signed-off-by: Byungchul Park --- include/linux/swait.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/include/linux/swait.h b/include/linux/swait.h index 6a8c22b8c2a5..02848211cef5 100644 --- a/include/linux/swait.h +++ b/include/linux/swait.h @@ -6,6 +6,7 @@ #include #include #include +#include #include /* @@ -161,6 +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); \ INIT_LIST_HEAD(&__wait.task_list); \ for (;;) { \ long __int = prepare_to_swait_event(&wq, &__wait, state);\ @@ -176,6 +178,7 @@ extern void finish_swait(struct swait_queue_head *q, struct swait_queue *wait); cmd; \ } \ finish_swait(&wq, &__wait); \ + sdt_might_sleep_end(); \ __out: __ret; \ })