[RESEND,v10,18/25] dept: Apply timeout consideration to wait_for_completion()/complete()
Message ID | 20230821034637.34630-19-byungchul@sk.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b82d:0:b0:3f2:4152:657d with SMTP id z13csp2787248vqi; Sun, 20 Aug 2023 21:56:15 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEX0ZXLNUvLlkeV7FwxUr6z2m1Vgr7gaHin+jwI/ITVyhHylZnrdTK+vAdBXjqrFwDSkOIs X-Received: by 2002:a17:906:30c3:b0:99b:f3ef:f084 with SMTP id b3-20020a17090630c300b0099bf3eff084mr4044592ejb.66.1692593775135; Sun, 20 Aug 2023 21:56:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1692593775; cv=none; d=google.com; s=arc-20160816; b=WH9TCJ8ZDEEHXx5PagQgxe6/7l/O8F0nis4IDDsRsqUbZMDVdMEy8f8tvhzHHmJMTF I8+KaeqPtivDs/hGbzoFw+00htsc0lKYYYXruFL1/4aVxZidCWELubKsAC6hg7XiC1ID /ztLC+Xr9LrXKooHJarQ282SpTSqMhjBa28rGLwSXyYdyGqe9EYxFeBL9ah0AJ/sv1e9 ROtfKJVFdqJ+2Ixeha9Vdr7wTGAJYLO5dGF7sjHj70oasycFEBYs5pHh7ROKOSTunZuy jbae4+zggqnAn2POgTovOMd0RaqsOBb5vywHTWUMHUYsbWyM8u78DJ28JoE8CT0vMYue CnjQ== 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=kmb2s4MSRQPbUE3zQMzsQm+h7YpxC3Zof1Ki3W/MRZI=; fh=kGnzKYSn064RMSZptPjPd5hgMSRJ2vTyckfMzEu7c/w=; b=ykgm9+4ihSQeZ2RCjTsZOKfm0nfVtXBstlEIGjQqDo0/1xlG1APq2HON55OhNs+4nk bXnjCw8EI6qWVEv7dZC5aWgaSUmyvXgZw+fQCpgz+rRRXg5tiXh+BBCmzl0R2bFRR/aS mbpgZCZGETGMe+nqsFzBhG7UGImL3upSTpKmvVb5D9XGMPQFqIpPFlFtPjlAr5J+Y6Q9 OtYoE/IRk59v+cJz5BG/4Z4N5a7//HsQz0O5e5AuYN7YdqH6MXnczWYIojhCzf/JfgaR dlQWHrcJpdTrPHS+Rkv3l6tPtAFyGplV2eqYSaqgsNdEXJEXzDEm2EvWaxibpcdjJPOl zQ0A== 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 ce11-20020a170906b24b00b0098d861f6513si5189744ejb.68.2023.08.20.21.55.43; Sun, 20 Aug 2023 21:56:15 -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 S232876AbjHUELJ (ORCPT <rfc822;chiang.bai@gmail.com> + 99 others); Mon, 21 Aug 2023 00:11:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57914 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230490AbjHUELI (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Mon, 21 Aug 2023 00:11:08 -0400 Received: from invmail4.hynix.com (exvmail4.hynix.com [166.125.252.92]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id BC383F2; Sun, 20 Aug 2023 21:10:31 -0700 (PDT) X-AuditID: a67dfc5b-d6dff70000001748-0b-64e2ded6ddcf 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: [RESEND PATCH v10 18/25] dept: Apply timeout consideration to wait_for_completion()/complete() Date: Mon, 21 Aug 2023 12:46:30 +0900 Message-Id: <20230821034637.34630-19-byungchul@sk.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20230821034637.34630-1-byungchul@sk.com> References: <20230821034637.34630-1-byungchul@sk.com> X-Brightmail-Tracker: H4sIAAAAAAAAAzWSa0hTcRjG/f/PdavJYQUdMygGERRphuVbRERRHYqgG9EN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zs2cMAMAAA== X-CFilter-Loop: Reflected X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS 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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1774813210747995381 X-GMAIL-MSGID: 1774813210747995381 |
Series |
DEPT(Dependency Tracker)
|
|
Commit Message
Byungchul Park
Aug. 21, 2023, 3:46 a.m. UTC
Now that CONFIG_DEPT_AGGRESSIVE_TIMEOUT_WAIT was introduced, apply the
consideration to wait_for_completion()/complete().
Signed-off-by: Byungchul Park <byungchul@sk.com>
---
include/linux/completion.h | 4 ++--
kernel/sched/completion.c | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/include/linux/completion.h b/include/linux/completion.h index 32d535abebf3..15eede01a451 100644 --- a/include/linux/completion.h +++ b/include/linux/completion.h @@ -41,9 +41,9 @@ do { \ */ #define init_completion_map(x, m) init_completion(x) -static inline void complete_acquire(struct completion *x) +static inline void complete_acquire(struct completion *x, long timeout) { - sdt_might_sleep_start(&x->dmap); + sdt_might_sleep_start_timeout(&x->dmap, timeout); } static inline void complete_release(struct completion *x) diff --git a/kernel/sched/completion.c b/kernel/sched/completion.c index d57a5c1c1cd9..261807fa7118 100644 --- a/kernel/sched/completion.c +++ b/kernel/sched/completion.c @@ -100,7 +100,7 @@ __wait_for_common(struct completion *x, { might_sleep(); - complete_acquire(x); + complete_acquire(x, timeout); raw_spin_lock_irq(&x->wait.lock); timeout = do_wait_for_common(x, action, timeout, state);