Message ID | 20230626115700.13873-17-byungchul@sk.com (mailing list archive) |
---|---|
State | New |
Headers | show
Return-Path: <owner-linux-mm@kvack.org> 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 5CE23EB64D7 for <linux-mm@archiver.kernel.org>; Mon, 26 Jun 2023 11:59:13 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 743958E0007; Mon, 26 Jun 2023 07:58:53 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 6F6138E0006; Mon, 26 Jun 2023 07:58:53 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 520218E0007; Mon, 26 Jun 2023 07:58:53 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0011.hostedemail.com [216.40.44.11]) by kanga.kvack.org (Postfix) with ESMTP id 3D45C8E0005 for <linux-mm@kvack.org>; Mon, 26 Jun 2023 07:58:53 -0400 (EDT) Received: from smtpin10.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay10.hostedemail.com (Postfix) with ESMTP id C6D4AC06F7 for <linux-mm@kvack.org>; Mon, 26 Jun 2023 11:58:52 +0000 (UTC) X-FDA: 80944752504.10.427389E Received: from invmail4.hynix.com (exvmail4.hynix.com [166.125.252.92]) by imf22.hostedemail.com (Postfix) with ESMTP id DCA9DC000D for <linux-mm@kvack.org>; Mon, 26 Jun 2023 11:58:50 +0000 (UTC) Authentication-Results: imf22.hostedemail.com; dkim=none; spf=pass (imf22.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=1687780731; 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=0Zjia+M7Fuvtj1FXetUg2PMVvH2dSwC0rHdkuHbJkG0=; b=fQeo/Lmlr+OnpkoKZq0Pg1lwjQV61sp80BjXhL/v8NNMPdLxtYAjTuFj4tbjqHHyPA9+Ui MPwQ/ghXt9zNlA5Sl+RojYTZYbUu5uh1zBE/+oxO8r56twqvfoMzZyGgHA4fE0sA6p3KaG /G4oRnTYrvczTQFscYFdT7NfRKFnleY= ARC-Authentication-Results: i=1; imf22.hostedemail.com; dkim=none; spf=pass (imf22.hostedemail.com: domain of byungchul@sk.com designates 166.125.252.92 as permitted sender) smtp.mailfrom=byungchul@sk.com; dmarc=none ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1687780731; a=rsa-sha256; cv=none; b=JklfAqWnzPDpPFSgHs1pKFkFoFlld/fivYCdt1Kg5yuNlr71KO5QaliZXGmTj4fwU+ot1v sjnj19WA1uLDVGmoUPCLpnI3A/NBJEtjrNafhpU3J/HOPq8XUlxe/JainpoJdWEzj+Wo+y Tc1rcf8HYYDNWam9pfV4r7SHdD+0gzE= X-AuditID: a67dfc5b-d85ff70000001748-9e-64997d6d97f8 From: Byungchul Park <byungchul@sk.com> 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 16/25] dept: Apply sdt_might_sleep_{start,end}() to dma fence wait Date: Mon, 26 Jun 2023 20:56:51 +0900 Message-Id: <20230626115700.13873-17-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: H4sIAAAAAAAAAzXSf0yMcRwHcN/nx/e5jsvj/HrEsNuaYYgpHz+Gv/TMMjZjxkbHPXTr7thF P2xtxZVIjUhFcq7byXWou7S4jhylpBy1lF1Nt0iUtrjqFLnT/PPZa+/3Z5+/PiJS+pQOESk1 JwWtRq6SYTElHphmWKFOLlCE9dwMgcsXw8D7M4OCwgcWDK77pQgsFakE9NVGwvvhfgRjTW9I yMt1Ibjd3UlCRV0XAkfJGQwtPcHQ6h3E0JCbieFs8QMMb7+NE+C+lkNAqXUHNF4yEFDj66Ug rw/DjbyzhH98IcBnMjNgSgkFT8l1Bsa7V0NDVxsNjg/LoaDIjaHa0UBBXZWHgJbHhRi6LBM0 NNbVU+C6nEXDve8GDN+GTSSYvIMMvKvRE1Cm8x/6Ou4gIP3HHxpeZtX4ZSwnoLXDjuBJxkcC rJY2DM+9/QTYrL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/Rms8fDt6k7j9iBVje2T4a82bDM2nxBWR914LvRKONBCaLoHzYqFNTjkcnXx+4N1TH7F5Qk1c7zChNip0g3ARNBEMz6fSd1jDaylyFED1XqtvAzDMg1u7uE1dCzjXw3aBsGa+84MV9nuCTEeh4aA/0zUn8h/4Ec97cxwM8Rg0H2zvHKYGbRv3/xhA7xwl+HFH9El7W+KZUsbiwLA25Q+yohFRZFPaCj9laJbHgDSdZUI7H6YwEheLrpoEcv1kSeRtqubfiRug3kSKeeuDiZxl9npnn8B22OUC7CQvtshdMvIKC8ailVBg+qPhXyiSQFDoZuhhgYx7aam53k7CytdjvcfOTBPoVL1+9BeCkUZ0HAC2TOJtD/oydCXAwWp+icbJRuqTo68EWtt+ewKdACuTVpc9Uh8tuHt+bZ+f7S/J0d4la7ab2UicU2HVmGvAwg+IKclU8m2oK97zwVr8C2Gagcc4YwZFZXQHlBCVfBtWUn/T7OqZUEMBLApJCltKu6oZB3AoFnbrTLQi/diBxdLsWQxS+L4TRYTUboLpBkUe5mV5BngB1CQl2GkQIRLKSH9WHFk/C8IGUmMYgKdzAwtgYI0Z7vqlbvaZ4TI4/QUbqUJKbe6WH3ZWCsnRTZVfT3IJOdelSbbyrS2WcC+qqX8C+bBJME2+xLslIcRPPRyspLUjXA/BLIbddY3z7Cf0J3c73NXmDadIET0JyoH7GVFkCqvVcNeZyuwGSed5KucVr/DBopb1lNUc1J KeU9tgSV 0q6umqQgDlu8hEe8GbEED+Bf+i7OdaRU4tUJAyHO4/RwFm6apUyD3uGq8dgOFB/s9M1Zj9Rdexi9qIS/TdXYMqhJQZXXTPjEM8ybxhSC69HQ9fOdX89oXHt1PtCJvAZ/vPCvxvrVNYRenVYiRZsSmpCxUxg== 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: <linux-mm.kvack.org> |
Series |
DEPT(Dependency Tracker)
|
expand
|
diff --git a/drivers/dma-buf/dma-fence.c b/drivers/dma-buf/dma-fence.c index 406b4e26f538..1db4bc0e8adc 100644 --- a/drivers/dma-buf/dma-fence.c +++ b/drivers/dma-buf/dma-fence.c @@ -16,6 +16,7 @@ #include <linux/dma-fence.h> #include <linux/sched/signal.h> #include <linux/seq_file.h> +#include <linux/dept_sdt.h> #define CREATE_TRACE_POINTS #include <trace/events/dma_fence.h> @@ -782,6 +783,7 @@ dma_fence_default_wait(struct dma_fence *fence, bool intr, signed long timeout) cb.task = current; list_add(&cb.base.node, &fence->cb_list); + sdt_might_sleep_start(NULL); while (!test_bit(DMA_FENCE_FLAG_SIGNALED_BIT, &fence->flags) && ret > 0) { if (intr) __set_current_state(TASK_INTERRUPTIBLE); @@ -795,6 +797,7 @@ dma_fence_default_wait(struct dma_fence *fence, bool intr, signed long timeout) if (ret > 0 && intr && signal_pending(current)) ret = -ERESTARTSYS; } + sdt_might_sleep_end(); if (!list_empty(&cb.base.node)) list_del(&cb.base.node); @@ -884,6 +887,7 @@ dma_fence_wait_any_timeout(struct dma_fence **fences, uint32_t count, } } + sdt_might_sleep_start(NULL); while (ret > 0) { if (intr) set_current_state(TASK_INTERRUPTIBLE); @@ -898,6 +902,7 @@ dma_fence_wait_any_timeout(struct dma_fence **fences, uint32_t count, if (ret > 0 && intr && signal_pending(current)) ret = -ERESTARTSYS; } + sdt_might_sleep_end(); __set_current_state(TASK_RUNNING);
Makes Dept able to track dma fence waits. Signed-off-by: Byungchul Park <byungchul@sk.com> --- drivers/dma-buf/dma-fence.c | 5 +++++ 1 file changed, 5 insertions(+)