Message ID | 20230626115700.13873-17-byungchul@sk.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp7448317vqr; Mon, 26 Jun 2023 05:34:20 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5DSCnMwLvuP9ud7+/i+w0EBXgZFYfxJwbmVdJdkCwHvQPylgp7bSv/YWiquL7qzg6MiaVu X-Received: by 2002:a05:6a20:54a7:b0:125:517c:4f18 with SMTP id i39-20020a056a2054a700b00125517c4f18mr11103044pzk.8.1687782859753; Mon, 26 Jun 2023 05:34:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687782859; cv=none; d=google.com; s=arc-20160816; b=GnibILcihjNByYa+9NBQIXJxX2LzRyXb8FrZ7X9EYkrtV1zpx82LFWTa03r7TImgzX G9WXEv3cnHsVqRS7wsOpVqAaI7w8GgdsIqGv07683Izwpb655Kc5qsVFHosWIF3B3vPd FQd7SiSHhRfYtQhnaomyDEdVvxPM+S8tuIV1f9BWjbQ3XSFqAz4xU+cWA8EKgeLGN0yT JZxWAgVuDkAx01Mtd6T5HOOBX6vyqsGATqFHmxgBB1VLY/XXZbGu1HlVz43qB7jFB7Ce L5HxBbLxAjgsim0bomkeCkpKKXoRJ1MVrQK0DIVtCyThi4h003rMfKLISrScxGCXYJQs mdjA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:references:in-reply-to:message-id:date:subject :cc:to:from; bh=0Zjia+M7Fuvtj1FXetUg2PMVvH2dSwC0rHdkuHbJkG0=; fh=XRjqVsBnH3A79ze0TZdn1GaMzocAY5TCjIrpk6ynN2Y=; b=EmqdB6eCE59WNUXA56Ltsj09jMilkgSnAeAvQKlmZEwd7y19bQW+EmGJmEy1nkHdL3 ltQ5xDhyc/xV6+ZfUY7fhz93PvrvfHqVqJdaus8b5946Vokte/boQf0fux981kBgwzyX 9kQKwxYXOcTtdE6A7HJmXxesXL0R0scV43tBuMzvuq8oo3F+QaKwRiC92fysGLn6zi8Z +eV+WU1apfMWUODHrNHB/R23JoYdz6wyZhYQSPhmp9wIuxNQFPgwiBROIaIF7PnYl3UB +QFBJwMxCsEQdKkbbPKhNY4DktF4c3ShlGGn7x9F4qc+KOVQTTmoE10jju+fbi7nQV1J Rayw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id 185-20020a6308c2000000b0053f7fcd4705si4962811pgi.541.2023.06.26.05.34.06; Mon, 26 Jun 2023 05:34:19 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230303AbjFZMTe (ORCPT <rfc822;filip.gregor98@gmail.com> + 99 others); Mon, 26 Jun 2023 08:19:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53724 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230176AbjFZMT2 (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Mon, 26 Jun 2023 08:19:28 -0400 Received: from invmail4.hynix.com (exvmail4.hynix.com [166.125.252.92]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 4E9B810DC; Mon, 26 Jun 2023 05:19:03 -0700 (PDT) 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 P2xtxZVIjUhFcq7byX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zaaNJ+AT5cFyg1AwAA X-CFilter-Loop: Reflected X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1769768599709539266?= X-GMAIL-MSGID: =?utf-8?q?1769768599709539266?= |
Series |
DEPT(Dependency Tracker)
|
|
Commit Message
Byungchul Park
June 26, 2023, 11:56 a.m. UTC
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(+)
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);