Received: by 2002:a05:6a10:413:0:0:0:0 with SMTP id 19csp12426pxp; Tue, 15 Mar 2022 22:09:43 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyMJDqhO1Qxzo3uVn4/4g98zwLs+PDKQ2ovcZDvvKSBeEAEvk4Y4pHz7TLUp/0jS+vB26gI X-Received: by 2002:a17:907:968f:b0:6db:a3c5:ae3e with SMTP id hd15-20020a170907968f00b006dba3c5ae3emr19900263ejc.770.1647407383380; Tue, 15 Mar 2022 22:09:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1647407383; cv=none; d=google.com; s=arc-20160816; b=dUMTkrOHYDyojpGtsyZBuHltIaJ9GgSf1jQYDsfsb2c1/16VAODCulFT5jBsFe9J8r NWKynxDm7BrFO51odLYg4zAXXlnRoxSHiaYzd5M65Rv3StwFxfTvOZIgUujEcfmhKMZy KzXhIbBtcxuG0ujuqeKZKSAs+19FAUxXHsulD4FOT1k05rtFRHCQrzGQMAUtB+xgVM+M zBfcXtmyW6JfW9cr0O1/rqbeu0q1fGah/vkYUBY/TKA9SbLxlANlbdET/QFddnbIgmat XxblcFNgWgAMRcHSnh6iidkj0IUpb0duMbfeKJLodS+Ignw2VnCiWrwMe0EMFtYIGVH7 cmzg== 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=LMm9KvMYHZDw2M+XuWj6UZiOZk/s6oKUD3q6VtZew/M=; b=SAKDABAETsBnFD6a/iMxqSEmwIo6ChBfk7dtw8DHQ2uDz3NoUFdsRMYalWdpFy/7IW v1aN5FtCBO/+4gwJEGNKrOvnaNQFMmeJg+NzLt0Ys44lRfrNQDsPd5pOGZAqkG9x8cqU qTcTI3R+UEdjEJRfVI1c0k7qjJO4vQ8GChQatBpjFB8+MLpM6LHoGXLIGdgLPyU2jueY iNTrhMKydJJigNwzFnp0PtyMFcrc+WjEMs3L+CRFU4WE5+GaT7MFpge5Idqfg6wUF0F9 Xr2PxDGXuEtgF9jREbF0JoofC8BZwwPhHi2f6lVeqlohW5H9rnLwm4XVggHT7qPprN70 C9Gw== 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 y22-20020a170906525600b006cee3ad5247si531157ejm.891.2022.03.15.22.09.15; Tue, 15 Mar 2022 22:09:43 -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 S1353401AbiCPCaW (ORCPT + 99 others); Tue, 15 Mar 2022 22:30:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55636 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1353258AbiCPC3N (ORCPT ); Tue, 15 Mar 2022 22:29:13 -0400 Received: from lgeamrelo11.lge.com (lgeamrelo11.lge.com [156.147.23.51]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id F25695F258 for ; Tue, 15 Mar 2022 19:27:13 -0700 (PDT) Received: from unknown (HELO lgemrelse7q.lge.com) (156.147.1.151) by 156.147.23.51 with ESMTP; 16 Mar 2022 11:27:11 +0900 X-Original-SENDERIP: 156.147.1.151 X-Original-MAILFROM: byungchul.park@lge.com Received: from unknown (HELO localhost.localdomain) (10.177.244.38) by 156.147.1.151 with ESMTP; 16 Mar 2022 11:27:11 +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 RFC v5 18/21] dept: Disable Dept within the wait_bit layer by default Date: Wed, 16 Mar 2022 11:26:30 +0900 Message-Id: <1647397593-16747-19-git-send-email-byungchul.park@lge.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1647397593-16747-1-git-send-email-byungchul.park@lge.com> References: <1647397593-16747-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 The struct wait_queue_head array, bit_wait_table[] in sched/wait_bit.c are shared by all its users, which unfortunately vary in terms of class. So each should've been assigned its own class to avoid false positives. It'd better let Dept work at a higher layer than wait_bit. So disabled Dept within the wait_bit layer by default. It's worth noting that Dept is still working with the other struct wait_queue_head ones that are mostly well-classified. Signed-off-by: Byungchul Park --- kernel/sched/wait_bit.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/kernel/sched/wait_bit.c b/kernel/sched/wait_bit.c index 02ce292..3e5a3eb 100644 --- a/kernel/sched/wait_bit.c +++ b/kernel/sched/wait_bit.c @@ -3,6 +3,7 @@ * The implementation of the wait_bit*() and related waiting APIs: */ #include "sched.h" +#include #define WAIT_TABLE_BITS 8 #define WAIT_TABLE_SIZE (1 << WAIT_TABLE_BITS) @@ -246,6 +247,8 @@ void __init wait_bit_init(void) { int i; - for (i = 0; i < WAIT_TABLE_SIZE; i++) + for (i = 0; i < WAIT_TABLE_SIZE; i++) { init_waitqueue_head(bit_wait_table + i); + dept_map_nocheck(&(bit_wait_table + i)->dmap); + } } -- 1.9.1