Received: by 2002:a05:6a10:9afc:0:0:0:0 with SMTP id t28csp1726005pxm; Fri, 4 Mar 2022 02:09:31 -0800 (PST) X-Google-Smtp-Source: ABdhPJxFKiiqSgmxy399GL0G6PyeMV+RawIhXqnUk840O/3ZuWHjp7k8k/XXobJpiVhYx9ba1zzU X-Received: by 2002:a62:1b4b:0:b0:4e1:83c7:effe with SMTP id b72-20020a621b4b000000b004e183c7effemr42861190pfb.75.1646388571590; Fri, 04 Mar 2022 02:09:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1646388571; cv=none; d=google.com; s=arc-20160816; b=exxpLl9OQII2WxUnZsJK21g/zsta6KIh+fu2ra8tPFS8K5Kz8blabhqXQ5NzMWne5u pAFws19azuzttsqpDqt06RqnfOyniXg/hpIMisRnH1ftXK+fZ1qc69smr5TZSWg9a+0m HdyJjRewlHLoJJBBOdL1uY14kO8121qOBVVxPbhdmifcUW2oTw7Jo+GIwX2v4UAHKeMN V3+Tjx5oWo1RcUhtTeTpktZy1PXcS2zlZH8kab7KV9g9FHYzaUx4ob+PRmI5TXhmi35a Al/GqbtH2SfNMbwtAUzb/WlO1biAEgfqcuyLCutMfzh1NhhvFcFOOSTM4za+tN5NxL1b 8lqw== 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=UOn7Br4tKFlmYofgAbVFdVXS0bAtrzzxP96c5g9+uQY=; b=m46WlfO/oV8T6ODVOHtZvvBM5lGA7KqT/Fgcnb7/yKmM05iTuaSg0c3ztsoTRuIGeE bOPr3chNK3zh+lPpcqGMp5Wxt3+ZEXssCRPFE+/CifnPD+rC9uHal6yAM7eubgPHdN6O auvF1ICH3CdlJetZiCzICUFx+cV92I7fphNSqR8SodzxD02uoraEkokJIFwSOHkwCISU L9U/iIgd9smd+NePJNIRgyfZVs6M/qQYgHF4gQ511SfOuf1WSgyBrgK9YMPtiwRIXLH5 EEHcIWkpvyEFIwH7Fw0u3Y7ashJlXKzBqj20FbTxVAMTK2FzY7Hp0eB3KVDIan7xv3YE omkA== 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id a11-20020a1709027d8b00b0014b5d3dc9a8si4266095plm.572.2022.03.04.02.09.15; Fri, 04 Mar 2022 02:09:31 -0800 (PST) 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 S238859AbiCDHJ4 (ORCPT + 99 others); Fri, 4 Mar 2022 02:09:56 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39262 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238672AbiCDHIv (ORCPT ); Fri, 4 Mar 2022 02:08:51 -0500 Received: from lgeamrelo11.lge.com (lgeamrelo12.lge.com [156.147.23.52]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 7DD6A19142D for ; Thu, 3 Mar 2022 23:07:12 -0800 (PST) Received: from unknown (HELO lgemrelse6q.lge.com) (156.147.1.121) by 156.147.23.52 with ESMTP; 4 Mar 2022 16:07:09 +0900 X-Original-SENDERIP: 156.147.1.121 X-Original-MAILFROM: byungchul.park@lge.com Received: from unknown (HELO localhost.localdomain) (10.177.244.38) by 156.147.1.121 with ESMTP; 4 Mar 2022 16:07:09 +0900 X-Original-SENDERIP: 10.177.244.38 X-Original-MAILFROM: byungchul.park@lge.com From: Byungchul Park To: torvalds@linux-foundation.org Cc: damien.lemoal@opensource.wdc.com, linux-ide@vger.kernel.org, adilger.kernel@dilger.ca, linux-ext4@vger.kernel.org, mingo@redhat.com, linux-kernel@vger.kernel.org, peterz@infradead.org, will@kernel.org, tglx@linutronix.de, rostedt@goodmis.org, joel@joelfernandes.org, sashal@kernel.org, daniel.vetter@ffwll.ch, chris@chris-wilson.co.uk, duyuyang@gmail.com, johannes.berg@intel.com, tj@kernel.org, tytso@mit.edu, willy@infradead.org, david@fromorbit.com, amir73il@gmail.com, bfields@fieldses.org, 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, jack@suse.com, jlayton@kernel.org, dan.j.williams@intel.com, hch@infradead.org, djwong@kernel.org, dri-devel@lists.freedesktop.org, airlied@linux.ie, rodrigosiqueiramelo@gmail.com, melissa.srw@gmail.com, hamohammed.sa@gmail.com Subject: [PATCH v4 20/24] dept: Add nocheck version of init_completion() Date: Fri, 4 Mar 2022 16:06:39 +0900 Message-Id: <1646377603-19730-21-git-send-email-byungchul.park@lge.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1646377603-19730-1-git-send-email-byungchul.park@lge.com> References: <1646377603-19730-1-git-send-email-byungchul.park@lge.com> X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_HI, RCVD_IN_MSPIKE_H5,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=unavailable 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-kernel@vger.kernel.org For completions who don't want to get tracked by Dept, added init_completion_nocheck() to disable Dept on it. Signed-off-by: Byungchul Park --- include/linux/completion.h | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/include/linux/completion.h b/include/linux/completion.h index a1ad5a8..9bd3bc9 100644 --- a/include/linux/completion.h +++ b/include/linux/completion.h @@ -30,6 +30,7 @@ struct completion { }; #ifdef CONFIG_DEPT +#define dept_wfc_nocheck(m) dept_map_nocheck(m) #define dept_wfc_init(m, k, s, n) dept_map_init(m, k, s, n) #define dept_wfc_reinit(m) dept_map_reinit(m) #define dept_wfc_wait(m, ip) \ @@ -41,6 +42,7 @@ struct completion { #define dept_wfc_enter(m, ip) dept_ecxt_enter(m, 1UL, ip, "completion_context_enter", "complete", 0) #define dept_wfc_exit(m, ip) dept_ecxt_exit(m, ip) #else +#define dept_wfc_nocheck(m) do { } while (0) #define dept_wfc_init(m, k, s, n) do { (void)(n); (void)(k); } while (0) #define dept_wfc_reinit(m) do { } while (0) #define dept_wfc_wait(m, ip) do { } while (0) @@ -55,10 +57,11 @@ struct completion { #define WFC_DEPT_MAP_INIT(work) #endif +#define init_completion_nocheck(x) __init_completion(x, NULL, #x, false) #define init_completion(x) \ do { \ static struct dept_key __dkey; \ - __init_completion(x, &__dkey, #x); \ + __init_completion(x, &__dkey, #x, true); \ } while (0) #define init_completion_map(x, m) init_completion(x) @@ -117,10 +120,15 @@ static inline void complete_release(struct completion *x) {} */ static inline void __init_completion(struct completion *x, struct dept_key *dkey, - const char *name) + const char *name, bool check) { x->done = 0; - dept_wfc_init(&x->dmap, dkey, 0, name); + + if (check) + dept_wfc_init(&x->dmap, dkey, 0, name); + else + dept_wfc_nocheck(&x->dmap); + init_swait_queue_head(&x->wait); } -- 1.9.1