Message ID | 1646377603-19730-20-git-send-email-byungchul.park@lge.com (mailing list archive) |
---|---|
State | New |
Headers | show
Return-Path: <owner-linux-mm@kvack.org> X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4E5C1C433EF for <linux-mm@archiver.kernel.org>; Fri, 4 Mar 2022 07:37:14 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 900FF8D0005; Fri, 4 Mar 2022 02:37:11 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 8D8308D0001; Fri, 4 Mar 2022 02:37:11 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 79FBF8D0005; Fri, 4 Mar 2022 02:37:11 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0202.hostedemail.com [216.40.44.202]) by kanga.kvack.org (Postfix) with ESMTP id 6E79D8D0001 for <linux-mm@kvack.org>; Fri, 4 Mar 2022 02:37:11 -0500 (EST) Received: from smtpin19.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id 22C3C181BECDF for <linux-mm@kvack.org>; Fri, 4 Mar 2022 07:37:11 +0000 (UTC) X-FDA: 79205897820.19.0D3CFEA Received: from lgeamrelo11.lge.com (lgeamrelo11.lge.com [156.147.23.51]) by imf15.hostedemail.com (Postfix) with ESMTP id 1407BA0008 for <linux-mm@kvack.org>; Fri, 4 Mar 2022 07:37:09 +0000 (UTC) Received: from unknown (HELO lgemrelse6q.lge.com) (156.147.1.121) by 156.147.23.51 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:08 +0900 X-Original-SENDERIP: 10.177.244.38 X-Original-MAILFROM: byungchul.park@lge.com From: Byungchul Park <byungchul.park@lge.com> 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 19/24] dept: Disable Dept within the wait_bit layer by default Date: Fri, 4 Mar 2022 16:06:38 +0900 Message-Id: <1646377603-19730-20-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-Rspam-User: X-Rspamd-Server: rspam12 X-Rspamd-Queue-Id: 1407BA0008 X-Stat-Signature: g3f3yjprucbxp9tao85igez5acdgamkp Authentication-Results: imf15.hostedemail.com; dkim=none; dmarc=none; spf=pass (imf15.hostedemail.com: domain of byungchul.park@lge.com designates 156.147.23.51 as permitted sender) smtp.mailfrom=byungchul.park@lge.com X-HE-Tag: 1646379429-446622 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: <linux-mm.kvack.org> |
Series |
DEPT(Dependency Tracker)
|
expand
|
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 <linux/dept.h> #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); + } }
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 <byungchul.park@lge.com> --- kernel/sched/wait_bit.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)