Received: by 2002:a89:2c3:0:b0:1ed:23cc:44d1 with SMTP id d3csp938309lqs; Wed, 6 Mar 2024 01:02:41 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCWUtCVhNXCHbSRuEw5ovpekAhnybo1gVZw0PFfK6Pp8/ALHe9lKUgc2pwZy8xnctn5xYIwfz7IQXo2BqN5NfQfxdRe03DP4g5WgnJxUGg== X-Google-Smtp-Source: AGHT+IF609dVD+9nknHcTfQ7UfpYYWAyYyZJd1/FeXSLR6l2X9O7pdCPiOzzOlgigLl0llCeCzdX X-Received: by 2002:a05:620a:1488:b0:788:193b:1283 with SMTP id w8-20020a05620a148800b00788193b1283mr4464195qkj.19.1709715761100; Wed, 06 Mar 2024 01:02:41 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709715761; cv=pass; d=google.com; s=arc-20160816; b=tlzIHB3Jdz2ZxnGsCzH1AQVrb7+ga3BO/yloj5zHfYO/EAKI88IS7Zu/kTHXZGD6kU CapPQtqKee9eV1/o8t+WGM5RGyBe2yoeH0ekjP1ppRxMrqYZ0It/trnsWcW5C8UpTUED mHZVpYmqa5sZMq+hlqi1CMmb/0oNLLYVAqUp8dNuS73a2lcUXsk1U6V4NTmL78fy1y0c 8Y7w42eZSesRIN0ddzj8K+xUb2L1l2eZHm3dwMGRJ9/Hj7FTpQRI9gkrrm2miiIbh2Kk NyJEqGAL6F1wFmrzXw2zJwjYbTELv5nvHvNNYMXa6QhTiZV/0RUg+TkX8TI5l9VRUCw9 DsnQ== 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=Z1Mu9mItqFFRxmNTCfIHg3Vgo+jSXM2iK+TaQ7EDB/s=; fh=H2KRUF8uSM4+6+w6W9vKW2QB11XTfop4gd9hLuyjokE=; b=PCUCCDcRC1DRoEvG0FesIBA9YPOM01mqUQNlk/uoLO//OjfD5O7xiP6vfEiiKifspM a2GBrYEm4RQB03uP8++j/Dapx0+MvkSKWyX8nQkUgtIUcgyaHTtUbpIgjlsk3J2YIRVE hPhjKXaOALQjs/fFewgToyKykyqSSSXsGOjOZjWo1vocY+f0WFU7ZS3pjNsfuM7dYhom vTimuhlKia4XUflalKqs3HdclcUXU9Q+DWatug/tZ1po0yMjo9UGLtJuLD3FpNOs4TBC 4ikOZ13piN3M72qOabnPCXaQTQqpKwrmKgdwcskKQa/K9ProeELOJug1szIYopZzGWOc pRDw==; 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-ext4+bounces-1539-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-ext4+bounces-1539-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id bk4-20020a05620a1a0400b007882f70c03dsi5888497qkb.185.2024.03.06.01.02.40 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 Mar 2024 01:02:41 -0800 (PST) Received-SPF: pass (google.com: domain of linux-ext4+bounces-1539-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=sk.com); spf=pass (google.com: domain of linux-ext4+bounces-1539-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-ext4+bounces-1539-linux.lists.archive=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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 389EE1C21816 for ; Wed, 6 Mar 2024 09:02:38 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 28C1E63404; Wed, 6 Mar 2024 08:55:46 +0000 (UTC) X-Original-To: linux-ext4@vger.kernel.org Received: from invmail4.hynix.com (exvmail4.hynix.com [166.125.252.92]) by smtp.subspace.kernel.org (Postfix) with ESMTP id BAA7560DEC; Wed, 6 Mar 2024 08:55:41 +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=1709715345; cv=none; b=WRHvJcZE9KozH9D3e1elkeiZSl5Z+hrXyQAkoXV77rF63Dsb4OUpPi/E0FnfSQxYYM8KFurvUJfZgucdv3nW2It8DQnO/fZ1Kd4DnwscWU9ZImRrzFmNWj1SES86/9HfiOYq8CakkpEbU/XOcNjxKsICeOCm3VA8Jk5RsdxKx5U= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709715345; c=relaxed/simple; bh=t4Qh0s/9NGiebNos8RWbTI6PuT087Z/eTqnpXervcDg=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References; b=sx2q5z6r9bQh4Nw9R3itYzm1MqpSYK43Fo/nUbAWYujNMz8bMNiihrMD9jz1ixtsX8Z1G/NhlY7eYP7UysNrcgIyCi1f/sVYy+jY1iOuFKNuNkz4VKVzyklBFmkX1Bu3KnBGq8adRw1oZLFj2ehymjETkox/5YRqizMnoKHeews= 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-18-65e82f7ece15 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, 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 v13 15/27] dept: Apply sdt_might_sleep_{start,end}() to dma fence wait Date: Wed, 6 Mar 2024 17:55:01 +0900 Message-Id: <20240306085513.41482-16-byungchul@sk.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20240306085513.41482-1-byungchul@sk.com> References: <20240306085513.41482-1-byungchul@sk.com> X-Brightmail-Tracker: H4sIAAAAAAAAAzWSa0hTcRjG+59zds7ZanJYhqf1wVp0M1ILizeKsC/1JxCiKKIkG3poIzWZ eVllaF4wTVNDLbP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4@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: 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 8aa8f8cb7071..76dba11f0dab 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 @@ -783,6 +784,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); @@ -796,6 +798,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); @@ -885,6 +888,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); @@ -899,6 +903,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