Received: by 2002:a05:7412:2a8c:b0:e2:908c:2ebd with SMTP id u12csp1491034rdh; Mon, 25 Sep 2023 14:40:04 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEKo1FtowD8kb1FwhlYwL2NyHYd8M+oAI+ynWRHLGJvi7W3/bYF4+BibHsODq5wQ/pY8+FI X-Received: by 2002:a05:6870:6486:b0:1c0:c42f:6db2 with SMTP id cz6-20020a056870648600b001c0c42f6db2mr10982387oab.37.1695678004592; Mon, 25 Sep 2023 14:40:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695678004; cv=none; d=google.com; s=arc-20160816; b=CGrZyUOTR4I+cWo0YhdB9dcV13jUbGsIpWrZYedIRmebUBaOBpTqv8gwu68s24LxNq ZwPjrb9HHwZIVFAEh6yuFPYapmAJWU22p5GaOEQ3RP3xLAAF8RAgxAluzdOKmo2Sm7E+ 3baJeS2cTAKCv3+L7hxt+tV059CNhbcgktZu+FPos/o51JfCLqYk5fV6oe2pOf+QnZiV 9ZBYA8XTeTV4XLeJRqAZzCCR+dhNeLoGmpHnX+fdYRaK0aAJ8IqfX/xBHjODhuHL8O+7 j1Jrt0y+pXfaJYMV2WwIQYfZoDYHco8cKHtk2eT9FVvpf0Lv2R3i6gE7AcChSTb1XYrX Dy6A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=lQLrlNGCb+vPilO6lJn6u66CNIMOvJVRBqliTOSp9uM=; fh=jvfOqOIJcjXKIDXJRwgwwxYo++8nk/CSyPbQOoM+dew=; b=DaWMqm8KOB5aZGXIExmHichp4Hy8aXv3deS6EDnmJzXeuCtc8pYCZwMuBh7PDqj0ii 2yxUZA0ZfkD/GVjsXKEBchCdVzd0fnnC+zR0BhE/wQGHmYHYuiVsZUzr7h5lPsjt17Ck Dt9fYPnUnXbvzmp1qVn2kRcKcUn4iw7RlSwFXDhN1yNQXCnzg7SF/qMfQPdUhhqsh+Xv M5LX2Aym1K6D1mhzOmwQiuFvdT/MaF5Dt8xDRxzS8IDng9AJs6qaw+fzcSPl3cQfQpak /moV/rEYY0j7kAkM1RK7Y6Z7Oc/l44CyYlfwXAc6VyINVoVQqHp5aiksgwAZmYgndvGN hgvw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=le9+MgwV; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from morse.vger.email (morse.vger.email. [23.128.96.31]) by mx.google.com with ESMTPS id t185-20020a6381c2000000b005697ed9a47csi10355103pgd.29.2023.09.25.14.40.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 25 Sep 2023 14:40:04 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) client-ip=23.128.96.31; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=le9+MgwV; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by morse.vger.email (Postfix) with ESMTP id 3FFC48049F00; Mon, 25 Sep 2023 14:36:44 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at morse.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233427AbjIYVgd (ORCPT + 99 others); Mon, 25 Sep 2023 17:36:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43078 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233397AbjIYVgb (ORCPT ); Mon, 25 Sep 2023 17:36:31 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 52202CE for ; Mon, 25 Sep 2023 14:36:25 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0A892C433C9; Mon, 25 Sep 2023 21:36:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1695677784; bh=u4uv3DNKD0E0OuUaQU04JetZHmO/2pYOxTl9tE5dGww=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=le9+MgwVi4N5+F9Uv4AIUXziNl8bJUB2zWxVlerYDjUSun6niHz+jfuQGiyaNWoeK DlMrAy4Q5GHkT0m1pXLRmYnUDgyPb05BFYzqcuKGzmjGqkXdkBLzhqNwyRqNL+UwSF p6j0/T8qHCktMPqRJTJFC1GT7s2TAY5C9EpXDjKgN1Ku7gjFNtG4bjRV8NBPYhroKP Ths1gi4tx/fezjOqNtev/2cUrbEBbb0TMU0DeamRZ3bpgpuLd+QwhEDTBcPPp2MNKN pZL+o3SZOhQMk749fH/hQ+i9Z9FpoNIGoCwKUSRJIg1i3v+CIB2QQg0OTOpPAo3RzJ Pf1PGmOl0Femw== From: SeongJae Park To: Jaewon Kim Cc: rostedt@goodmis.org, tjmercier@google.com, yuzhao@google.com, kaleshsingh@google.com, akpm@linux-foundation.org, vbabka@suse.cz, hannes@cmpxchg.org, linux-kernel@vger.kernel.org, linux-trace-kernel@vger.kernel.org, linux-mm@kvack.org, jaewon31.kim@gmail.com Subject: Re: [PATCH v3] vmscan: add trace events for lru_gen Date: Mon, 25 Sep 2023 21:36:19 +0000 Message-Id: <20230925213619.263131-1-sj@kernel.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230924142343.23924-1-jaewon31.kim@samsung.com> References: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.2 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on morse.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (morse.vger.email [0.0.0.0]); Mon, 25 Sep 2023 14:36:44 -0700 (PDT) Hello, On Sun, 24 Sep 2023 23:23:43 +0900 Jaewon Kim wrote: > As the legacy lru provides, the lru_gen needs some trace events for > debugging. > > This commit introduces 2 trace events. > trace_mm_vmscan_lru_gen_scan > trace_mm_vmscan_lru_gen_evict > > Each event is similar to the following legacy events. > trace_mm_vmscan_lru_isolate, > trace_mm_vmscan_lru_shrink_[in]active > > Here's an example > mm_vmscan_lru_gen_scan: isolate_mode=0 classzone=1 order=9 nr_requested=4096 nr_scanned=431 nr_skipped=0 nr_taken=55 lru=anon > mm_vmscan_lru_gen_evict: nid=0 nr_reclaimed=42 nr_dirty=0 nr_writeback=0 nr_congested=0 nr_immediate=0 nr_activate_anon=13 nr_activate_file=0 nr_ref_keep=0 nr_unmap_fail=0 priority=2 flags=RECLAIM_WB_ANON|RECLAIM_WB_ASYNC > mm_vmscan_lru_gen_scan: isolate_mode=0 classzone=1 order=9 nr_requested=4096 nr_scanned=66 nr_skipped=0 nr_taken=64 lru=file > mm_vmscan_lru_gen_evict: nid=0 nr_reclaimed=62 nr_dirty=0 nr_writeback=0 nr_congested=0 nr_immediate=0 nr_activate_anon=0 nr_activate_file=2 nr_ref_keep=0 nr_unmap_fail=0 priority=2 flags=RECLAIM_WB_FILE|RECLAIM_WB_ASYNC > > Signed-off-by: Jaewon Kim > Reviewed-by: Steven Rostedt (Google) > Reviewed-by: T.J. Mercier > --- > v3: change printk format > v2: use condition and make it aligned > v1: introduce trace events > --- > include/trace/events/mmflags.h | 5 ++ > include/trace/events/vmscan.h | 98 ++++++++++++++++++++++++++++++++++ > mm/vmscan.c | 17 ++++-- > 3 files changed, 115 insertions(+), 5 deletions(-) > > diff --git a/include/trace/events/mmflags.h b/include/trace/events/mmflags.h > index 1478b9dd05fa..44e9b38f83e7 100644 > --- a/include/trace/events/mmflags.h > +++ b/include/trace/events/mmflags.h > @@ -274,6 +274,10 @@ IF_HAVE_VM_SOFTDIRTY(VM_SOFTDIRTY, "softdirty" ) \ > EM (LRU_ACTIVE_FILE, "active_file") \ > EMe(LRU_UNEVICTABLE, "unevictable") > > +#define LRU_GEN_NAMES \ > + EM (LRU_GEN_ANON, "anon") \ > + EMe(LRU_GEN_FILE, "file") > + I found this patchset makes build fails when !CONFIG_LRU_GEN, like below: In file included from /linux/include/trace/trace_events.h:27, from /linux/include/trace/define_trace.h:102, from /linux/include/trace/events/oom.h:195, from /linux/mm/oom_kill.c:53: /linux/include/trace/events/mmflags.h:278:7: error: ‘LRU_GEN_ANON’ undeclared here (not in a function); did you mean ‘LRU_GEN_PGOFF’? 278 | EM (LRU_GEN_ANON, "anon") \ | ^~~~~~~~~~~~ Maybe some config checks are needed? Thanks, SJ [...]