Received: by 2002:a05:7412:2a8c:b0:e2:908c:2ebd with SMTP id u12csp403610rdh; Sat, 23 Sep 2023 16:16:27 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHhGrPLRt+21+t7/BEiycRTQzOmCnpi45MoZHZnljJQs91M2PayEiCbyxcm1M1S9pviMnkL X-Received: by 2002:a05:6e02:e0f:b0:345:79eb:e001 with SMTP id a15-20020a056e020e0f00b0034579ebe001mr3768363ilk.19.1695510987556; Sat, 23 Sep 2023 16:16:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695510987; cv=none; d=google.com; s=arc-20160816; b=mauf2YN2huIO3EtyYKlxEChmsbk7GiNWoBRY1JdfT8iE8MSkEruJqkAZCylP9O0TF3 sD1467gfoxZJnbzlqaqROA8OjGsQnpUSdhSur1NRaE/bbdQf0XJzD8uoGv8yPmwhutJJ NXDLBCE3wdqrdml1hfCO4dLuuNRxpTWDPk/MUR5owRoP8lQr1PtuGZvnodqmZrxSTLgY aK+kSvC58wWqtC+RzeEe9Jr1H+QMWiyoyBdQ5BXCXDbmUDYBYni94DvlXBgEQ7BrYROF XPnfOYaL+XtSnVjdOISaq1FnF645di+EN6x30JajrjDs/C27xOYxbstg4zQCVW9io+3y 4sHQ== 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=x+h/az42itE2oKI662KLx1KdcIMxc2RkjNaC45gpe54=; fh=heMeBfhwusCEiL2URGbuKRrDxzv9ewdpm36IxxIBxOk=; b=WzY1rdRVG1BQ9pFmD3Ow/Z+e0Zm7IVH37L2S+ynkplMIRPOxUSlpNAlA+ksxpoOwNP IVTVPIO5fSBiBpH41AdoPgJPxgVuDT29vBFTpAh4GcZzr25ydXdmbgVpmW1XPQOBWepM iP2/iSRmTl8kwckpoxz3fgzmhgRL3a/V7mg6zobGr95jZcxKrsA2LQJGYaM0XjEwRSVJ N1wjUvs8OmHOr2vn137tt4FmVYvA9+AfRgWvQQKlgeSEi0sg8ect1sZSet4O8uHRi5K1 roSabybQJQhTs4rY+lISFsD04OyUM2PSZqXouPzpLNjGGUPvn0QLx9Cujp0FvKpgMMmR iPHQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=SNbNDfid; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 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 agentk.vger.email (agentk.vger.email. [23.128.96.32]) by mx.google.com with ESMTPS id q16-20020a656850000000b0056b4065299esi6804062pgt.621.2023.09.23.16.16.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 23 Sep 2023 16:16:27 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) client-ip=23.128.96.32; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=SNbNDfid; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 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 agentk.vger.email (Postfix) with ESMTP id DFFBC8087257; Sat, 23 Sep 2023 08:26:23 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231799AbjIWP0V (ORCPT + 99 others); Sat, 23 Sep 2023 11:26:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58582 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229946AbjIWP0U (ORCPT ); Sat, 23 Sep 2023 11:26:20 -0400 Received: from mail-yb1-xb33.google.com (mail-yb1-xb33.google.com [IPv6:2607:f8b0:4864:20::b33]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DA3E2A9 for ; Sat, 23 Sep 2023 08:26:13 -0700 (PDT) Received: by mail-yb1-xb33.google.com with SMTP id 3f1490d57ef6-d85800eb234so4220684276.0 for ; Sat, 23 Sep 2023 08:26:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1695482773; x=1696087573; 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=x+h/az42itE2oKI662KLx1KdcIMxc2RkjNaC45gpe54=; b=SNbNDfideU2foFDKGHypkjE2hiZ6Xv5iKihRY6zYc3Iv9qUCBLCxX32KiYNNWROfhm CrNi5xhbVrQYShQINwfT7rI+JxDww/Z1BZWzw0elnh58n87O27xpa1QEm6bqrP+cofxp 64OW2BXgcmrenB8VEpX662y9N9HFLrmpoHRiv71rrZmJNmZbJh4bO3h07B465GIANfGT k2kijed2udFAi7XZ8KhtryCin71UyevQpgZ9vvCSZYrscV+ioaHckjJ+W/New/vhUGts c5Bf+l2b1U5o5VVQXcB5ygEWnJj1zI3tMPlUDJIevQBDE7f0NymIQZsay8ZYEiaNkEXw Q24g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1695482773; x=1696087573; 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=x+h/az42itE2oKI662KLx1KdcIMxc2RkjNaC45gpe54=; b=VjboPOHkAelwe9me2En40mJwbQEhmpFQWMQmeyVGkwzQ4Otam/m/2U2D347wQJhbSq SpiJkQ5IjCTGSMS+FM4gRLp29arbJOEwnVv1MmrvpmQgvqRIfn6wR9+hFj/7LQHm17yH daCCS9vozE57/w8FWXvnkABlZQJnp9tQLNZNpCRDwrtqKDq6vysZWCDgiWBnsLRGz8vH YRCUXYnCYrdehSIM6gPVmtw22xQMcDqn5utYoqkH4zKMud9S8LUIvTUGMSn0CDMSdE69 jl/7XN6zyOTVmzZ8+fXpuY1ArgEK3r2jkFCsimyvc2iRJ5Un0hukfF5GsEw0+GQGG3OP GRmg== X-Gm-Message-State: AOJu0YyQKOBnuml/r1xs2Pbj2yZT41Yc9XgHeQJ8k1WQVicdQXm9GiOg pXHEkVWM7RQNR4M15B8S6itAfNImGI/YPl4FwcSyUw== X-Received: by 2002:a25:b94f:0:b0:d84:d709:7966 with SMTP id s15-20020a25b94f000000b00d84d7097966mr2743218ybm.0.1695482772915; Sat, 23 Sep 2023 08:26:12 -0700 (PDT) MIME-Version: 1.0 References: <20230921062206.14429-1-jaewon31.kim@samsung.com> <20230921122244.1cbf2d57@gandalf.local.home> <20230922022746epcms1p323c50015241eb01311e7e10579fd4c6c@epcms1p3> In-Reply-To: <20230922022746epcms1p323c50015241eb01311e7e10579fd4c6c@epcms1p3> From: "T.J. Mercier" Date: Sat, 23 Sep 2023 08:26:01 -0700 Message-ID: Subject: Re: [PATCH v2] vmscan: add trace events for lru_gen To: jaewon31.kim@samsung.com Cc: Steven Rostedt , "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" Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-4.8 required=5.0 tests=DKIMWL_WL_MED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RCVD_IN_SBL_CSS,SPF_HELO_NONE,SPF_PASS, USER_IN_DEF_DKIM_WL autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on agentk.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 (agentk.vger.email [0.0.0.0]); Sat, 23 Sep 2023 08:26:24 -0700 (PDT) On Thu, Sep 21, 2023 at 7:27=E2=80=AFPM =EA=B9=80=EC=9E=AC=EC=9B=90 wrote: > > >On Thu, 21 Sep 2023 09:12:30 -0700 > >"T.J. Mercier" wrote: > > > >> > + TP_fast_assign( > >> > + __entry->nid =3D nid; > >> > + __entry->nr_reclaimed =3D nr_reclaimed; > >> > + __entry->nr_dirty =3D stat->nr_dirty; > >> > + __entry->nr_writeback =3D stat->nr_writeback; > >> > + __entry->nr_congested =3D stat->nr_congested; > >> > + __entry->nr_immediate =3D stat->nr_immediate; > >> > + __entry->nr_activate0 =3D stat->nr_activate[0]; > >> > + __entry->nr_activate1 =3D stat->nr_activate[1]; > >> > + __entry->nr_ref_keep =3D stat->nr_ref_keep; > >> > + __entry->nr_unmap_fail =3D stat->nr_unmap_fail; > >> > + __entry->priority =3D priority; > >> > + __entry->reclaim_flags =3D trace_reclaim_flags(file)= ; > >> > + ), > >> > + > >> > + TP_printk("nid=3D%d nr_reclaimed=3D%ld nr_dirty=3D%ld nr_wri= teback=3D%ld nr_congested=3D%ld nr_immediate=3D%ld nr_activate_anon=3D%d nr= _activate_file=3D%d nr_ref_keep=3D%ld nr_unmap_fail=3D%ld priority=3D%d fla= gs=3D%s", > >> > >> Many of these values are unsigned so I think many of these format > >> specifiers should be %lu instead of %ld. > > Hello T.J. > Thank you for your comment > As you expected I got this from the legacy lru trace. > I've changed as you recommended. > Actually I changed isolate_mode, too. Please let me know if this is not a= ctually needed. > Great, looks good to me. Reviewed-by: T.J. Mercier > --- a/include/trace/events/vmscan.h > +++ b/include/trace/events/vmscan.h > @@ -367,7 +367,7 @@ TRACE_EVENT_CONDITION(mm_vmscan_lru_gen_scan, > * classzone is previous name of the highest_zoneidx. > * Reason not to change it is the ABI requirement of the tracepoi= nt. > */ > - TP_printk("isolate_mode=3D%d classzone=3D%d order=3D%d nr_request= ed=3D%lu nr_scanned=3D%lu nr_skipped=3D%lu nr_taken=3D%lu lru=3D%s", > + TP_printk("isolate_mode=3D%u classzone=3D%d order=3D%d nr_request= ed=3D%lu nr_scanned=3D%lu nr_skipped=3D%lu nr_taken=3D%lu lru=3D%s", > __entry->isolate_mode, > __entry->highest_zoneidx, > __entry->order, > @@ -525,7 +525,7 @@ TRACE_EVENT(mm_vmscan_lru_gen_evict, > __entry->reclaim_flags =3D trace_reclaim_flags(file); > ), > > - TP_printk("nid=3D%d nr_reclaimed=3D%ld nr_dirty=3D%ld nr_writebac= k=3D%ld nr_congested=3D%ld nr_immediate=3D%ld nr_activate_anon=3D%d nr_acti= vate_file=3D%d nr_ref_keep=3D%ld nr_unmap_fail=3D%ld priority=3D%d flags=3D= %s", > + TP_printk("nid=3D%d nr_reclaimed=3D%lu nr_dirty=3D%lu nr_writebac= k=3D%lu nr_congested=3D%lu nr_immediate=3D%lu nr_activate_anon=3D%u nr_acti= vate_file=3D%u nr_ref_keep=3D%lu nr_unmap_fail=3D%lu priority=3D%d flags=3D= %s", > __entry->nid, __entry->nr_reclaimed, > __entry->nr_dirty, __entry->nr_writeback, > __entry->nr_congested, __entry->nr_immediate, > > > > >Other than this, from the tracing POV: > > > >Reviewed-by: Steven Rostedt (Google) > > > Hello Steven > I've appreciated your Reviewed-by, let me take this on my next v3 patch. > > > > >-- Steve