Message ID | 20230703094752.79269-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 C3FFEC04FDF for <linux-mm@archiver.kernel.org>; Mon, 3 Jul 2023 09:50:15 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 4E6728E00B1; Mon, 3 Jul 2023 05:49:56 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 4708A8E00B0; Mon, 3 Jul 2023 05:49:56 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 274398E00B1; Mon, 3 Jul 2023 05:49:56 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0013.hostedemail.com [216.40.44.13]) by kanga.kvack.org (Postfix) with ESMTP id 1219E8E00AE for <linux-mm@kvack.org>; Mon, 3 Jul 2023 05:49:56 -0400 (EDT) Received: from smtpin13.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay08.hostedemail.com (Postfix) with ESMTP id CBC5014071E for <linux-mm@kvack.org>; Mon, 3 Jul 2023 09:49:55 +0000 (UTC) X-FDA: 80969829150.13.4F45202 Received: from invmail4.hynix.com (exvmail4.skhynix.com [166.125.252.92]) by imf24.hostedemail.com (Postfix) with ESMTP id DCA1C180007 for <linux-mm@kvack.org>; Mon, 3 Jul 2023 09:49:53 +0000 (UTC) Authentication-Results: imf24.hostedemail.com; dkim=none; spf=pass (imf24.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=1688377794; 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=fW/5vPNvqyS7/RKGZPQfYaWvXYOULq65yUl15zU0hUc=; b=Txt9nkFNsvpd9PfTgCr78tQyDg14p43u3fCXTPTK1ziVgvs+vy5R+Ev0u5RZpR7RkKMSuC Oo1vUytAZ/nKMDPucE1PyWkO2VpF/EG57C0lOo36tJrIVHYifwiKDbAzAyjggCMGbCOpqd vsZio/3cldWuzu9Iy3kM15PhWqRYyJg= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1688377794; a=rsa-sha256; cv=none; b=TZ6x9kvQR3sdV1u2IUweTdCJpEucFwcj3JgKI43GZpaiYnkhuCta+jbaDFGjPQyzyAMzIG ENLN5o25bT/GO+CCTgl/3hKBbW5icvuyWVQ5MAO//qVhtT4GUqalo1/HMdc5bW50CjNhQA B7HPSuoh0cLJsplSEg9Oh0AM4Xu1WIA= ARC-Authentication-Results: i=1; imf24.hostedemail.com; dkim=none; spf=pass (imf24.hostedemail.com: domain of byungchul@sk.com designates 166.125.252.92 as permitted sender) smtp.mailfrom=byungchul@sk.com; dmarc=none X-AuditID: a67dfc5b-d85ff70000001748-d8-64a299b373f9 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, 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 rebased on v6.4 16/25] dept: Apply sdt_might_sleep_{start,end}() to dma fence wait Date: Mon, 3 Jul 2023 18:47:43 +0900 Message-Id: <20230703094752.79269-17-byungchul@sk.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20230703094752.79269-1-byungchul@sk.com> References: <20230703094752.79269-1-byungchul@sk.com> X-Brightmail-Tracker: H4sIAAAAAAAAAzWSa0xTZxiA/c7lO6fF4rFj8agRtQkhYQx1EfOG6eKPRY8/nCYaY1QinT0b Hde1grLNDCyIk4uIA+QSbSuptRQvbVVEaxiEe4BuNAy1koHoRrhtaDsK6NZi/PPmyfPmfX69 LCl/QK9i1anHRU2qMlmBpZR0cqnhY0elUbVx6g0DFwo3gvf1WQpqbloxuG7UIbA6cggYa90J v/smEMz39JFQUeZCYBh+RoKjbQiB03waQ/9oKLi90xg6ywow6K7exPDr+AIBnvJSAupsu6G7 xEhAk/9PCirGMFRX6IjA+IsAv8nCgCk7AkbMVQwsDG+CzqEBGpxPPoLKyx4MD52dFLQ1jBDQ 31iDYcj6Hw3dbR0UuC4U0VA/ZcQw7jORYPJOM/Bbk56AW7mB0JlXb2loL2oi4EztbQLcjx8g eHT2DwJs1gEMLd4JAuy2MhLmrrUiGCmeZCCv0M9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Q7cpfqwzcK+nBcKXp Jwzjv3Uh8FydxuB0TBDoC8xjcDkrKHh7sx+Bv/QlC5eLgyzUFpQiKLpcScOjd/cYMHsTYflN HUlOEvvmFyjR7MoS3UsWWhyyCuLtmqesaPY8YUWL0yi67DvFxu45LDYsBhjR2fwdEZ2L5axY +HIci69GRljx/g/LtDgzXoWPbj4l26uWtJpMSR+3P0WW9n1whFwqkGdbXE1sPnouK0QRnMDv Eir/tjJhJvwOYXIySIU5kt8iuEp+D3kZR/HfrhHsfz4k4WE9nyoERoZQmGl+m9DeuciGWc7v FiymCfRfNFpoaet5H4oI+edvSt97BZ8oeKunyDUks6APmlGkRpeZrtJoE2MNF9JydJrs2HMX 050o9DS2vJWyTvR67GAv4jmkXCufzG1QKxhVpiEnvRcJHKWMlJt8N9QKuVqV85Wkv3hGb9RK hl60iaOVG+Wfn5BSFPx5VYZ0QZIuSfr/V8xFROUjpWfN9gPDQnRGF702d3R34UqW23ynaN/M jo67v3gOGdcplnxnU0H+2RZNOXNow9c+fzD32JcdW5OFuGfyJHvjsN8xFj1bU2Jp+TRqOm/2 wEd743GdV5F6OsL4iXG140NOtmmotWt/sX86RkeOr1fmbVe7N54sPlJL1fv2eLTJq0rakKZK 2EnpDap/ATXR0DQwAwAA X-CFilter-Loop: Reflected X-Rspamd-Queue-Id: DCA1C180007 X-Rspam-User: X-Rspamd-Server: rspam11 X-Stat-Signature: kg1yn759j4ugmfy3cs3nxyh9dr3s6ogo X-HE-Tag: 1688377793-484091 X-HE-Meta: U2FsdGVkX19o2Q09Ry3xXIux7XMUxWRCS8/KRVlhEjm/J58wNddeYZIv8ROMBvCSzcr3/O/IG3xHeEU/EJ6VTupOH7L2K10Hj3i/gmdFnjdZkBs/JIh0V/7qY8lmQ2cu6iqjFbohfCMtpNGdw82spMj5JbxhOsfaLcLUTqKWrkNw+WDfTVAQm4rfeVdM5q3xsLk3K+Qd+8faESp4ncHoTHfCFdit3iS8+AsqqGbO0x6HkKfcyH3Ls8uDNizn3br5w8gb/ZR6sJRINufh70vAnoA6915GrGDmRCgOxgBCs16/uTKa2Wt7HnIURzpnJsaCdwsy1YZQppJtskmEG+KPaWL2mvD/3bei1tu+60tukBtc1a9k9lketT70f3W1p0qNYbBoeQKlMuL5rtipxYrjWe/kIYhXBKVXUFLfO/nfQR39feEw055bYsUmkufN8nl1Q4sXve2cgUcAjwvYDvbnvNgmVarCIbINGHls6Q8gaWTUlEKy87CQQhN3Td6RSZK3tkZlqdqFM0GmF2ajo5LFwI5Xkj3Lf5M9Kr3yWDjiUHW0EOEsy4yGXcJ91ju8oZSAVnoSjkAWCjUlj4eQLtcLA1Sp49L/m2wuyRpD0PP20By0spfiVcOigLLkus3Nfk5wkevYi363sOtaBqaSKUUyHsQ/uYOGBDCIuuqFGTNOgJ2w//m7pT7CkkiuJgP6/rlC0uANNawGETCypKYAblA5BNnsuy8SYxlnoxOTvTTNUgIMzbXsFE+mqDigLA4zbwOMFMumS42LKJ92D6+s7uNHdha7MtfRja87s098fhBe+GGr6t4O4r5WdJtHVMYJOdtJDONw/vuoE/+BfpfD/9SaPolwbQuSvO/wUcHaL2TQOCs0z4dBsx1Zqk7gHlmOCpCLvznwbi3zH475xzSHZscpHMVX1lsyrP/E1xvnZgLhHo7beuCfaXdZA/6JUqSl6YJyMq0cZ7DbhBULq+09L77 N62RGOqK RPMVrLwf9w7lh6pL8uvs4HAEcvcT4eQiyvgjD/DKTvJfcrPrVeIFxdJZ4PmIpynmWYHSdfLjfIE0P1vDKK+xrVzt3LDuDjpDJzL5vaKn1lv6XHW68ma9MMMKqSgVnBXYxO7ZYvnTwrfYITvusVP2xGORFQg== 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 f177c56269bb..ad2d7a94c868 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(+)