Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp16063635rwd; Mon, 26 Jun 2023 05:23:49 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4pVXZkvDl4OBbB13llDkf1SZMBQMcoTXXY5w8Km5RM/8GpgA/6a8RXQanF5FL1CQKp/cD8 X-Received: by 2002:a17:90b:1d0c:b0:262:e273:403f with SMTP id on12-20020a17090b1d0c00b00262e273403fmr3378487pjb.8.1687782229013; Mon, 26 Jun 2023 05:23:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687782228; cv=none; d=google.com; s=arc-20160816; b=uKp1oOfe/XRCInAnkk7mN4bnW2F59FElyiWC0EOMMZanMRCnqiX0+O6hLqwZe+mMHT 2j+kI1qN6oEGieUbcU4D5XsvtlfRb1Rr9yqm/owBgLQa/cBUinSGLxAlW6Hew0aRxhNq /+AW93xG48ZETyQG2dKcOAalmyTvM8bzny2Qoc96hkDut1tD3pDDXm60+wmFfBLF/dGq NgTbg14npk6hlsdVsg0yU7hsBtyWKpneXqAJOuTeQsIJ5D44QqqpnEpY6crvl45TBIdL 4Wb8oIMJJPnqcqzIjsd5OlerFVT+6fbhiHumQRaJPBC05Bf8qwkGICCWniAikpHETtzr HBfg== 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=a8XchggV0oLSr1bicLxzKoDyYhly3uftH5TRgUK10emcjPa8kY2ZBGWml2q8uQapQk vAL/8Z5362jarz06Y9TGrCbc+tOrni2VvTG5U19TbaYBm1sTA8XfIbwm0AzS1oNM4gBf WLW7+Q5oIR1NTygPmEy2hXQX5keERcXtmPMLdMLWPSNzTXSa9yTntrqUgx17dcr0TNuG bG8KcyANYWwk07Pol36psieHYUwfQ6RUntasMmMOFgrWe0zb7QkAWdcV6KpM0Bs1MPkj TU15AJ2Syv4bcnl4+GmKaqF9Aznk39iNQmICZ0kG3j71Hm40g9X4MvMU6R7tNZmSApK8 wmpg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id a7-20020a634d07000000b00557888b4eb9si5212747pgb.622.2023.06.26.05.23.36; Mon, 26 Jun 2023 05:23:48 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-ext4-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-ext4-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230138AbjFZMTc (ORCPT + 99 others); Mon, 26 Jun 2023 08:19:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53588 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230303AbjFZMT1 (ORCPT ); Mon, 26 Jun 2023 08:19:27 -0400 Received: from invmail4.hynix.com (exvmail4.hynix.com [166.125.252.92]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 12A1410D3 for ; Mon, 26 Jun 2023 05:19:03 -0700 (PDT) X-AuditID: a67dfc5b-d85ff70000001748-9e-64997d6d97f8 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 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 yMt1Ibjd3UlCRV0XAkf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qxgFGuWlc43FNfrNI/KKag5qIHo2woGGs47MPT+1YLAcdFMwXBn NtwfDSMYv91Dg6WuF8Hpwcc0XPQOIPA07cHgf/o19EVHMPjqDmAobTyP4e7LGAXBo7UUtMir ofuQjYK2sSEGLMMYTlhKqfh5QcGYvZkDe0kahJqOcxAbXAS+gQALHSd9LHgezoP6U0EMbo+P AW9riAL/lQYMA47PLHR7uxjorali4c/XNgwvR+002KMjHNxrs1JwoSy+9k/MQ8HeN59YuFHV FteZvynoe+BCcLXiCQWyI4ChIxqmwCnX0fDhj04EoepXHJQfHOPghLkawYHyowz0fLzBQlkw A8bfN+CsTNIRHqFJmXMX8YxaGXLTJpLLxx9zpOzqQ45Y5Z3E2TSXNLqHKXI6EmWJ3LwfEzlS y5HKV30UCQbcmLy+c4cjXcfGmbUzflFk6qRcfaFkXPjTZkWOq/wSW2BW7n7X/QCVoGeKSpTE i8ISMWT1swlj4Tuxv3+MTjhZ+FZ0Vj2P5wqeFhoniENd17lEMUVYL5p7Q0zCjJAmnnKdwQkr haXirYpz9H+js8SWC23/Oimeu27ZUMIqIUPcE2zHh5DCir5qRsn6vEKDVp+bscC0PacoT797 wdZ8g4zin2MvjtW0orf+7HYk8Eg9UamZeUynYrWFpiJDOxJ5Wp2snPbeolMpddqi3yRj/ibj zlzJ1I6m84w6Rblqg7RZJWzT7pC2S1KBZPy/pfik1BJUsZr2vmE1xciYcjulf/Jg9YuptfNX LN3Wyc/0L3cenn323N0N10q9mnoyEbLWp/7u3tJ/pCd9X2Tt5NmhcDjSOulk/vdqt/3n7DkB 9xNX18rrSkPkhyFf4Ef/vtiyNNU64zdiAb1VzrLMaw5UTq/Uyuaip9kbM1WLW8/a0tMdv6oZ U4520VzaaNJ+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=ham 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: X-Mailing-List: linux-ext4@vger.kernel.org Makes Dept able to track dma fence waits. Signed-off-by: Byungchul Park --- 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 #include #include +#include #define CREATE_TRACE_POINTS #include @@ -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); -- 2.17.1