Received: by 2002:a05:7412:bc1a:b0:d7:7d3a:4fe2 with SMTP id ki26csp1198260rdb; Sun, 20 Aug 2023 23:20:44 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFbIZ7mw0N2l7ndD7uC3H9rjN6EMOdFLf9Se13tjPAiS3VkO4DBvJY1sLbaOhqP1lESfSwh X-Received: by 2002:a05:6a20:9184:b0:134:37bb:89be with SMTP id v4-20020a056a20918400b0013437bb89bemr4466070pzd.57.1692598844290; Sun, 20 Aug 2023 23:20:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1692598844; cv=none; d=google.com; s=arc-20160816; b=LHVhpeLk//GL5dc2BvvqXHzIvciRuTK5Ve0QW5YFWyG8v7NYYYAv4jwQWUvSf9HwpH K64067yr98IjUOrLpoP98NgiSALi/wuHU4KKd0uaxjuLngzHq04APBLWpREeH/IracQE RfUdDc3bvUFqFZ2X84OG1F86IorYK0aazS8rbVgbxB3Wsed6adke2nMm457KJjwPe1GH 6E9W3hjYuUr2CcrdP5XVHxV9UlOEokQ03YqeGh0ySHbJGSzbgoYsh7hVsjp5e2Jtbk05 jHqxHSuglIMy7rW8V0QXh7hlo//qdyY/0jmpdcYe5uKf3XApPX9jV9Vi9fYh+pwYKoow XLcw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=1qfzz0Gh1nYviVYv1uNqU4900imcTeIN3oi8RJ9QCow=; fh=U90oH+c+JbXJQyqnUvNChjnMkwnenO3lQv0dZQpOyfA=; b=hgDo5ZCRNoQwTpE1pCYFExgp6U8gLP1uKwxMmzDfJXI/DlZAG2yUTV9dVbQyRU+C9T Ko+KgB3L0FC5KhyRAXisXBQxkbceBoUJo7cuOQNCsLVIiwn1efByrbtqqip9PbmWxDYR WMulVG7NdXYceOBUvpCpIMndzeLSud+yEEX5WGs6wrsdP4CzKYA0AnYfX3AcJq2Sm2i7 dOK4re5G9Hnhzx1wiObZqWMqc5wIUxhrFc3A6xdpuUNg4dfucN73L8Q2OmTGUz7HEojf GswzBzeJV2X7tIfmFtR+76JoGy7gOiB7OnKjwuQ+TiV1euYV0XALUK4N8mB80+klOOMB DK1w== 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 n41-20020a056a000d6900b0068717b693e5si6301498pfv.135.2023.08.20.23.20.29; Sun, 20 Aug 2023 23:20:44 -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 S232881AbjHUEkz (ORCPT + 99 others); Mon, 21 Aug 2023 00:40:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37056 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233056AbjHUEky (ORCPT ); Mon, 21 Aug 2023 00:40:54 -0400 Received: from invmail4.hynix.com (exvmail4.hynix.com [166.125.252.92]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 93114A8; Sun, 20 Aug 2023 21:40:48 -0700 (PDT) X-AuditID: a67dfc5b-d6dff70000001748-09-64e2eacf1ef5 Date: Mon, 21 Aug 2023 13:37:44 +0900 From: Byungchul Park To: Matthew Wilcox Cc: linux-kernel@vger.kernel.org, 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, 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: Re: [RESEND PATCH v10 08/25] dept: Apply sdt_might_sleep_{start,end}() to PG_{locked,writeback} wait Message-ID: <20230821043744.GA73328@system.software.com> References: <20230821034637.34630-1-byungchul@sk.com> <20230821034637.34630-9-byungchul@sk.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.4 (2018-02-28) X-Brightmail-Tracker: H4sIAAAAAAAAA02SbUxTZxTH8zz3lWrnpZP4SBenXcgWFpwyDCebMUu2yE0WExM1cfoBm/Vm NFIgrYD4FphFWxAGmtJZiULB2mDV7YKuY+AYRKCSSafMdYhEauNAeUmY7caKZXTEzC8nv5yX X/4fDk+pFphkXp93QDLmaXM1rIJWTC13pg0+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sQESqdX/QMZ9r0hdAMAAA== 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: X-Mailing-List: linux-ext4@vger.kernel.org On Mon, Aug 21, 2023 at 05:09:44AM +0100, Matthew Wilcox wrote: > On Mon, Aug 21, 2023 at 12:46:20PM +0900, Byungchul Park wrote: > > @@ -1219,6 +1220,9 @@ static inline bool folio_trylock_flag(struct folio *folio, int bit_nr, > > /* How many times do we accept lock stealing from under a waiter? */ > > int sysctl_page_lock_unfairness = 5; > > > > +static struct dept_map __maybe_unused PG_locked_map = DEPT_MAP_INITIALIZER(PG_locked_map, NULL); > > +static struct dept_map __maybe_unused PG_writeback_map = DEPT_MAP_INITIALIZER(PG_writeback_map, NULL); > > Hmm, why are these "maybe unused"? *digs*. Ah. Because > sdt_might_sleep_start() becomes a no-op macro if DEPT is disabled. > > OK, the right way to handle this is > > #ifdef CONFIG_DEPT > #define DEPT_MAP(name) static struct dept_map name = \ > DEPT_MAP_INITIALIZER(name, NULL) > #else > #define DEPT_MAP(name) /* */ > #endif > > And now DEPT takes up no space if disabled. Currently: #if !defined(CONFIG_DEPT) struct dept_map { }; #endif So I think it doesn't take space at all. Do you think I still need to introduce e.g. DEPT_MAP()? Then I will. Thank you! Byungchul > /* */; is a somewhat unusual thing to see, but since this must work at > top level, we can't use "do { } while (0)" like we usually do. Given > where else this is likely to be used, i don't think it's going to be > a problem ...