From patchwork Wed Feb 21 09:49:14 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Byungchul Park X-Patchwork-Id: 204100 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:693c:2685:b0:108:e6aa:91d0 with SMTP id mn5csp934883dyc; Wed, 21 Feb 2024 01:53:30 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCUBRX3nleFowBKTjTaBCz8V1VHlQ3BYvN124jfSR8000SiM6/91NOiab/T47Lyma61F95L7OLn9cZAO6q/lyZftNUyzvQ== X-Google-Smtp-Source: AGHT+IFlcvuCwmvFy17TPtG7VtpB6k2VfEH4rTm4kBj0jBjQ+oJuumpyfOJRVhRfCQbLvD8V0bkF X-Received: by 2002:a17:906:3ad6:b0:a3c:a655:3a3c with SMTP id z22-20020a1709063ad600b00a3ca6553a3cmr11268435ejd.16.1708509210213; Wed, 21 Feb 2024 01:53:30 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708509210; cv=pass; d=google.com; s=arc-20160816; b=ZX0cBbRcn68TuU8LcdYaVHMGj9L+6mLxNncwPq2P1RW6Oo0OItTWKdCJEHpknGKJM8 PiRR1k8xNofzhBdjsvsLwNFr9QCKu0+lbzKAjAxPe87xIt19VVrZiR+7FAiBSnDPBnoN 0mHNn8QoqyuTxsCcQAKRLNSFVgfufl95bt7HE5yAGpyPqkJi7lkshRlIZq9sGgP8KMGj nz63HS1CxZWnzHx3n902w6eE2mKC8a6gJ0IDjI6hGpkXOEzWD7k+/6xNAXcATau3VTRz Z2sodjyjB5FrgeAIuyJh05TBF4tz/9r3ku6sybLQYEGV6fSBA4LlrI3IxLdLK+TJnIdP cQAA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-subscribe:list-id:precedence:references :in-reply-to:message-id:date:subject:cc:to:from; bh=jJeNhuOs33ufOy9DU95W1l4Cp1Nhf5LuW3gJvObKSUY=; fh=QMm8m/ZWm+A1EqjKAllYKUqNg+o2tkLujHELlI5tZV0=; b=J3mv8iQUO95RlG8F03BVUfHE8X8LVuRaRjgXmntVvQKOKkmb9q68Kaj5H7WQeHSwgv 9HpZZryGz4Y4D7yYoztA3JCFf1fl5GV4EFXiX3EENgVKGPf/CrpGoLBJ6am/63Zyybcd gURd0sIr/YNTpNjWE2dK6z3r8D9zNhgsWsUOjt1N5ofv+iST5i/bx/aOz/lstVCzA3x7 XyZAHepbXgxzvR71e1fVUMGPY2zV/dAQMD47y9HFGwAet5uTUZkH/WPL4rsMyTHqdFLE oODkGtxDibcaHIUwzDPgbtpE27z6fvvpi5sQWHaGoGfa0ZBIdsCbNQSjxLiWNzA+l38Z dhQg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=sk.com); spf=pass (google.com: domain of linux-kernel+bounces-74445-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-74445-ouuuleilei=gmail.com@vger.kernel.org" Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id f20-20020a1709062c5400b00a3e42cc90d2si3599186ejh.58.2024.02.21.01.53.30 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 21 Feb 2024 01:53:30 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-74445-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=sk.com); spf=pass (google.com: domain of linux-kernel+bounces-74445-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-74445-ouuuleilei=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id E8C091F26A6E for ; Wed, 21 Feb 2024 09:53:18 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id D971B481BD; Wed, 21 Feb 2024 09:50:02 +0000 (UTC) Received: from invmail4.hynix.com (exvmail4.hynix.com [166.125.252.92]) by smtp.subspace.kernel.org (Postfix) with ESMTP id CC2FD3DB8B; Wed, 21 Feb 2024 09:49:56 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=166.125.252.92 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708508999; cv=none; b=K0x8PVKp1n1eahvJ0KB+uyJbWnmkH0hGYDZ21ifCckEO3stCM8Hs7rt0eEM/voOto4vDi8F2xp8uJYH7Ci5j3jDFYRWdU4H6WLice6Yra2WTfoZ9XUe/wSMZTVtPC+Cwnf6PuCTBu30Uja7wvxC0U48qMLDkZ1oRI5ZANhrYb9U= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708508999; c=relaxed/simple; bh=tg0pA2ZlUNywKtzMfrdbwkG7GYbhIVlK2HrCAbcpiMY=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References; b=ilXn6EIazSSsZn+F6JDyR0nnMirrCCJINn0G+muttEpJagmlTYMILiJe26RUUn5D9zxW8aKw4gwyu1MQ+FGBccmhltVEMgY4PH9at3wMcs75YOEjamg95iru1gWq0UC2zSOdEK+eHrWEh86AHygHNTjFm73C2XUJ0mGZ0P4HuLQ= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=sk.com; spf=pass smtp.mailfrom=sk.com; arc=none smtp.client-ip=166.125.252.92 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=sk.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=sk.com X-AuditID: a67dfc5b-d85ff70000001748-08-65d5c739c5b2 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 v12 08/27] dept: Apply sdt_might_sleep_{start,end}() to swait Date: Wed, 21 Feb 2024 18:49:14 +0900 Message-Id: <20240221094933.36348-9-byungchul@sk.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20240221094933.36348-1-byungchul@sk.com> References: <20240221094933.36348-1-byungchul@sk.com> X-Brightmail-Tracker: H4sIAAAAAAAAAzWSe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UqVTd+PBgW4p3a2BwZahJvrv39bMZXb62mqypHTeljxfBQUqcX/wCj3/+Y LwMAAA== X-CFilter-Loop: Reflected Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1791501753946296110 X-GMAIL-MSGID: 1791501753946296110 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 d324419482a0..277ac74f61c3 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; \ })