Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp16064161rwd; Mon, 26 Jun 2023 05:24:16 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4BAXWrrmGUx2tgLoT3g0uXSMipPZknqJXDnIF3RoZIDDkBOhd8nbJ1C2SW1rUSCI830jFQ X-Received: by 2002:a05:6a20:734d:b0:111:997d:d224 with SMTP id v13-20020a056a20734d00b00111997dd224mr21805862pzc.19.1687782256104; Mon, 26 Jun 2023 05:24:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687782256; cv=none; d=google.com; s=arc-20160816; b=WNuJcsQh3Zo5rvNm6XPFT68pqPP42UYyueuZSzLTKyX/WWXnPastwwPOLlFma9ac4M trW+MoSyhh3rNFENoWpFEynjhydKg9GC0MwvoLbnp3egYZqRwC2L+HdcxytGct7NV0F+ 2urrDGv9yN15GlgiXuWBt/Wm4tGQyp9M9U5ytW/MP+15CTNdto+yA/k7D5/9m8gPea1n RvXDZP+CbExQGypi7YB4mr8m4UcyWMR21gTbDRYFLIUgtir57O5fW0YWlzsaUhOMz0Dd bdOFacWGVxsXiGIyXaWbsJmtBEeRs40O9ozTnAfUJlCT/xZ3TVDEEVHiYdYbyBt8Wc0T OdIQ== 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=XRjqVsBnH3A79ze0TZdn1GaMzocAY5TCjIrpk6ynN2Y=; b=FSkIs6dExnY1OAv5yKaRM0rKpzts5xAdIthVfGPwaEW/G7EBKMYRl5Ps0+ku+i2q6d SgnlpHoserGejwQqXGdJcIojMtKMVKI1mItAQ02pTWZbrg95+DzFnebA7JzyR/w8Vikj Q1nhCC7ddJblJWin9qLLAXRto9KtebBXWDz2WRGfdKDBjXRDtyjpIxBKbvGRpmueHH22 pFUiVb9kwXoWhVl58FCSi2iuTfR7Dh33va2Jg6M9oB83Vc1hgDfJTQqnkPMW1WcoDeah ZVbi3RCTzN8acebE3zSxd6E6TYRKiPVQ4kkKhRQtw+K6Qw9pL/MCuS36cqbRus5J9Edl 8eQQ== 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 y40-20020a056a001ca800b006714b161b92si3221371pfw.324.2023.06.26.05.24.01; Mon, 26 Jun 2023 05:24:16 -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 S230413AbjFZMTo (ORCPT + 99 others); Mon, 26 Jun 2023 08:19:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53644 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230013AbjFZMT2 (ORCPT ); Mon, 26 Jun 2023 08:19:28 -0400 X-Greylist: delayed 323 seconds by postgrey-1.37 at lindbergh.monkeyblade.net; Mon, 26 Jun 2023 05:19:04 PDT Received: from invmail4.hynix.com (exvmail4.skhynix.com [166.125.252.92]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 4EFDA10E7; Mon, 26 Jun 2023 05:19:03 -0700 (PDT) X-AuditID: a67dfc5b-d85ff70000001748-c0-64997d6d15c4 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 18/25] dept: Apply timeout consideration to wait_for_completion()/complete() Date: Mon, 26 Jun 2023 20:56:53 +0900 Message-Id: <20230626115700.13873-19-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: H4sIAAAAAAAAAzWSa0xTZxjHfc/lPYfObieVyREXN5vhdSo4MM/ispgYt/fDlriYaKLxcmKP 0nDRFUFZRsKlGLkp4KBaCNaiXUNRtBi8QAmCchkC3SQIpFQgOscEqsxWGFVsWfzy5Jfn/3v+ nx6eVjWy4bw28ZisS5Ti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 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 Now that CONFIG_DEPT_AGGRESSIVE_TIMEOUT_WAIT was introduced, apply the consideration to wait_for_completion()/complete(). Signed-off-by: Byungchul Park --- 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); -- 2.17.1