Received: by 2002:a05:7412:d8a:b0:e2:908c:2ebd with SMTP id b10csp3917795rdg; Wed, 18 Oct 2023 09:29:14 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFqNJzkM2YK4uaoyjAFRuzM8xTSz3QRyvOTgfXCsp6emJfSCcHyvKXxEkrH9KFz2Fic90zy X-Received: by 2002:a17:902:ef0e:b0:1c9:ba6f:af04 with SMTP id d14-20020a170902ef0e00b001c9ba6faf04mr4843409plx.35.1697646553960; Wed, 18 Oct 2023 09:29:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697646553; cv=none; d=google.com; s=arc-20160816; b=lKIvDKGZtQPVOM+AUkVk+vaC0rtgK98dxpGqMKzpN8EC65744VqDUKHXdDl+LXzR+8 hUu46GNCRXjKQygas9rm/oqPlSzt5k+xgozjgsny5XKo3tgpp/B4oOI5FZAULxPNx8sv v7PE3jgejZ5ryj4MJRepITkCjTEv0AvSTX5iRQyei3Y9A79Vj/hh6BaiSY5cpdvIBXBw vHNQYt9kl8DyEcj8m4rNR24sy96GUuzUhH5nMO65j+dbkIE34+vx7lE0IN++p9/d9tJP Laan8slx7+urGgGa8j/xhx281bKiFegLJNmIO0brRqjpUlrUwcH3rczGsdXIevgjcGH3 SUEg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=NP8epScHrNgHZ84MxLEjBdBvtFkaSpGQFw1IMN4MPNo=; fh=Q0VzVVQMtjh8UMV6wBJGSFhGm+73aUGZ8450NEOnWuc=; b=l0BD5FEkL4ne5nP2219+Wx1C3PPDn3rygVtAVlkgWKPKWs0yzgBLxapMmeHOZzT8ql hEjfiWSrJbAYH9lyEBj35c8ahU8/sg5zgjqrOry44BnXwlTPXSmAMDw/KTab+VUt0UsB KyPQgBeZejAjLUABTftcdpOGrGWERM3Qz7bkvvx01xJeKk3lqFwqTVcbrutv3bzxR9FI lYeGG6e9pHgem/vKLjA8al5tdu/nEoeoVhmHn5ZloJS9fgFKzCYW1ysSQwac3SHvcpXx lw4bbyqPLHqZnXX3lJuOjyNCPELwU7qmO67CjyOqMVgB1BArMmIP/NrH7sQtukrRb6fZ j2NA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=EwJsb7Mj; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from pete.vger.email (pete.vger.email. [2620:137:e000::3:6]) by mx.google.com with ESMTPS id w7-20020a170902e88700b001b8ac52a19esi203272plg.436.2023.10.18.09.29.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 18 Oct 2023 09:29:13 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) client-ip=2620:137:e000::3:6; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=EwJsb7Mj; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by pete.vger.email (Postfix) with ESMTP id A75D0802A58C; Wed, 18 Oct 2023 09:29:11 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at pete.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229908AbjJRQ3G (ORCPT + 99 others); Wed, 18 Oct 2023 12:29:06 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44524 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229562AbjJRQ3F (ORCPT ); Wed, 18 Oct 2023 12:29:05 -0400 Received: from mail-qt1-x82b.google.com (mail-qt1-x82b.google.com [IPv6:2607:f8b0:4864:20::82b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9F659FA for ; Wed, 18 Oct 2023 09:29:02 -0700 (PDT) Received: by mail-qt1-x82b.google.com with SMTP id d75a77b69052e-419b53acc11so299391cf.0 for ; Wed, 18 Oct 2023 09:29:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1697646541; x=1698251341; darn=vger.kernel.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=NP8epScHrNgHZ84MxLEjBdBvtFkaSpGQFw1IMN4MPNo=; b=EwJsb7Mj9rMz7vi3ocLoJpYksd2wJNBPiYfTs5tTcoBvo6bRv9mg3Sdj1cDlXsPjTE Ic5LsgN19EvEThygVh2DRBgKgY4TTcJsFxeyAB0C5XP2JSsO5EH3R327EWLddCaJGVwu /v0yaw3ub/VJ9N5qf6ed1ZlAiPvgG9+7Rb/H4enMvJhkAR059tDdPoZenOJcpC2avBlP 1/NK80j3ySdsGtUneqBRM9gr6cERg3q0P2Zq4YRXhFgpKBUdFBJPZdxdnli0/C6WvqHs WPtXa4GEP2IdiWLRPuYHMaLFLyrJf3fauw95Jofzt/CNG7MFbXmxa0cO4lImO6KITLUb XmGA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697646541; x=1698251341; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=NP8epScHrNgHZ84MxLEjBdBvtFkaSpGQFw1IMN4MPNo=; b=fwZpFRAKTzl5T4GpybUVq53lqVcqAzdn0p9413d4ouol7Fi3bGdvi9yrcTQiFlaKWr 05iQQ4hAOuotrtCOCMVeOUNkV0cRO9u0u0fhsSibNcXim5leSzdq2W/5Rb7GQFwt2hTq WqW/HRiVQqLxQZxl1zaMRCmq0cDXy3KBrF8zviobycgp4I7UpAhTXVhGdgv7+hsGU39+ Uu8vzDS0SBt17pnTxfE6B5e7lWTvcWX6rHVGGeKv3R0gk6tFLx39FOfYp3EA7C2R8VZc LZxgMmNCtBtP4s7LiXwGmBZA6sDnNW9zC4SaewONMJJa5GWfSbq8QhEop3gyYlOxM8mp FGPA== X-Gm-Message-State: AOJu0YzlnsV+OM+NpgLVih7+oys7Rg0hh4BA1g0buWSEwaVoJ12V7uz7 BmaR1TkOSoi0gMzkcE8R2Db3J0wH/K0ENeBIX31/ZA== X-Received: by 2002:a05:622a:4713:b0:404:8218:83da with SMTP id dn19-20020a05622a471300b00404821883damr251529qtb.1.1697646541251; Wed, 18 Oct 2023 09:29:01 -0700 (PDT) MIME-Version: 1.0 References: <20231018082104.3918770-1-link@vivo.com> <20231018082104.3918770-2-link@vivo.com> In-Reply-To: <20231018082104.3918770-2-link@vivo.com> From: Yu Zhao Date: Wed, 18 Oct 2023 10:28:25 -0600 Message-ID: Subject: Re: [PATCH 1/2] tracing: mm: multigen-lru: fix mglru trace To: Huan Yang , Jaewon Kim , Kalesh Singh Cc: Steven Rostedt , Masami Hiramatsu , Andrew Morton , Suren Baghdasaryan , Vlastimil Babka , linux-kernel@vger.kernel.org, linux-trace-kernel@vger.kernel.org, linux-mm@kvack.org, bpf@vger.kernel.org, opensource.kernel@vivo.com Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-8.4 required=5.0 tests=DKIMWL_WL_MED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_IN_DEF_DKIM_WL autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on pete.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 (pete.vger.email [0.0.0.0]); Wed, 18 Oct 2023 09:29:12 -0700 (PDT) On Wed, Oct 18, 2023 at 2:22=E2=80=AFAM Huan Yang wrote: > > This patch add two reclaim stat: > nr_promote: nr_pages shrink before promote by folio_update_gen. > nr_demote: nr_pages NUMA demotion passed. The above isn't specific to MLGRU, so they should be in a separate patchset= . > And then, use correct nr_scanned which evict_folios passed into > trace_mm_vmscan_lru_shrink_inactive. > > Mistake info like this: > ``` > kswapd0-89 [000] 64.887613: mm_vmscan_lru_shrink_inactive: > nid=3D0 nr_scanned=3D64 nr_reclaimed=3D0 nr_dirty=3D0 nr_writeback=3D0 > nr_congested=3D0 nr_immediate=3D0 nr_activate_anon=3D0 nr_activate_file= =3D0 > nr_ref_keep=3D0 nr_unmap_fail=3D0 priority=3D4 > flags=3DRECLAIM_WB_FILE|RECLAIM_WB_ASYNC > ``` > Correct info like this: > ``` > <...>-9041 [006] 43.738481: mm_vmscan_lru_shrink_inactive: > nid=3D0 nr_scanned=3D13 nr_reclaimed=3D0 nr_dirty=3D0 nr_writeback=3D0 > nr_congested=3D0 nr_immediate=3D0 nr_activate_anon=3D9 nr_activate_file= =3D0 > nr_ref_keep=3D0 nr_unmap_fail=3D0 nr_promote=3D4 nr_demote=3D0 priority= =3D12 > flags=3DRECLAIM_WB_ANON|RECLAIM_WB_ASYNC > ``` Adding Jaewon & Kalesh to take a look.