Received: by 2002:ac0:950c:0:0:0:0:0 with SMTP id f12csp1946689imc; Tue, 12 Mar 2019 04:06:42 -0700 (PDT) X-Google-Smtp-Source: APXvYqygVXsa5BSyDWwMvpKjYPC6OFUZfUxdErgEwuWyBSuM6e8QX6IThHVCwNqu+86AcXnCO1jm X-Received: by 2002:a62:e910:: with SMTP id j16mr37814812pfh.44.1552388802165; Tue, 12 Mar 2019 04:06:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1552388802; cv=none; d=google.com; s=arc-20160816; b=V5yKhXks2yqz1E6yd9KIv9Q8+D3fxvNsCrRSMOuSHsfz1lhB2PdOXI+SzdZxSR2iop xp5jWKJ/6bc52u30t9gsko+NzkLJ8UtbHMjbl5KrAEOJeGSkQZzCfcikqYKWDJTxGXEZ aovbMtWhb/8uaQbC3p/8PoTiTNSlBZvMSFJZ+0JClfvXm5jHAyRHjtd7H6XtvoX9trN2 ASgbPSUjvIIHpiNg5RhN8FcWVPoTXTY3WfTgUj35EtpvDj06DbaH1+KYf2e366Vrl4Mc xe8GJyhouFJztLu5X5CSVPFO5ZVf1BCW1TMFm8bjbBbAu3ZjvpfpUwtBdMcOWDee+OL7 hvcQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=xH7u0SIa2NIqLp+XLrFdsgjL0uBSb7uHvpHDRDB7p5U=; b=HyedWm92SyMKfwUWRPIDFdQsGBhbITbsBW+zqMmK0bmNHGw5TzSHnh3fYdBaHd3sYo k49HnIgLUN8irkMlXEFioV5oeY5vQc6xeoFN/CouqVZFl12JZOVWezgN1zcoD2u0YQLL I8ResWIFKRH6AlEuxyY8s0oskNRty1co4NXTV+l7jKFM5pPOBHlsJlaa+zVx9n1iKYso ysA7EazbFso80OK7eib8ncn406hadY+wi4XVTfP5zPP9TF6l+JYW3KDIw8+sylYBuoUx GCjqLKcDQuYGvJqg2F6aD1I7EDMs53AL5BqoHpag0phEbGi+W2MCu/av4fbMngGR9V+S 9U+w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=mOW5+EKM; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u133si4911360pgc.477.2019.03.12.04.06.25; Tue, 12 Mar 2019 04:06:42 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=mOW5+EKM; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726426AbfCLLFU (ORCPT + 99 others); Tue, 12 Mar 2019 07:05:20 -0400 Received: from mail-io1-f65.google.com ([209.85.166.65]:46881 "EHLO mail-io1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725811AbfCLLFU (ORCPT ); Tue, 12 Mar 2019 07:05:20 -0400 Received: by mail-io1-f65.google.com with SMTP id k21so1643769ior.13 for ; Tue, 12 Mar 2019 04:05:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=xH7u0SIa2NIqLp+XLrFdsgjL0uBSb7uHvpHDRDB7p5U=; b=mOW5+EKMTy+WiyZtH8detQ3wUr/c7TNL1Qy/LragZbtl6h2wdtk49YpuBuEexJQlsa lj/VBzbcVbMX9yaYBUWfsQ0b2NhR9CXKz8alLTdwboeei/qmPJnXqLG8iXsTOscAjjtt BPWsJi0A6suM2TbTuXNmpBd6Phl7VhP5Bs3JpSRno1kE3EhPCbL3OmVCeuasv/g7wd6A qgANJkBulCV5vrq4nIXXatCsj+DHQvBUNkXsDgLx+iPRf1AM6GTmRBfwRN8ns3HckGyH hXZyUvVqNQA2PhtNZu6YCe372FG3VMhaerjz6N3zJZdaJkrIc9zUGliaB8LDWp7BE1c7 AZEg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=xH7u0SIa2NIqLp+XLrFdsgjL0uBSb7uHvpHDRDB7p5U=; b=kAD+/VslsW7vbTgAnMn6x2eqgZsqIL9a1jPh7puibsmbYe3spSgu0JwJ+qNOu1Wki1 C66pJwczMFxtHMp4yY2ok6lSBQUpaD4pBCPm26z6fisdS6oH5GXblbud8UEFh9G5pTt7 CQrL1IMOSqcRUUXXbuLQPzOjwP+oKTv1fXxHBLyV+yAMcw6tXkQMis9DJki1ft2DAiAe 8bp1YkF/F7efqsUrn18i7jGyDpL8/+gJfPQDXkxpkGBAPm6Nr5dD1Sa2zvEjX2KbDO1m +VoIjXL9qZg4OiXSo0ptJ60CKy2Lktn6OHPLhP6ex2OYsaV+j0HFQhC3Yz0AF4gZIKf/ CsFA== X-Gm-Message-State: APjAAAWVZPk7UWMePP7ggzRi9QzL6t9CAVBXJB/XNgyxCAf6J/QqHcGV vmnisNFm1wrfIMWa5OxgzEXqHm6rVaFCNAX+dCg= X-Received: by 2002:a6b:c3cc:: with SMTP id t195mr7892691iof.11.1552388718871; Tue, 12 Mar 2019 04:05:18 -0700 (PDT) MIME-Version: 1.0 References: <1551425934-28068-1-git-send-email-laoar.shao@gmail.com> <20190311084743.GX5232@dhcp22.suse.cz> In-Reply-To: <20190311084743.GX5232@dhcp22.suse.cz> From: Yafang Shao Date: Tue, 12 Mar 2019 19:04:43 +0800 Message-ID: Subject: Re: [PATCH] mm: vmscan: show zone type in kswapd tracepoints To: Michal Hocko Cc: Vlastimil Babka , Souptick Joarder , Andrew Morton , Linux MM , LKML , shaoyafang@didiglobal.com Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Mar 11, 2019 at 4:47 PM Michal Hocko wrote: > > On Fri 01-03-19 15:38:54, Yafang Shao wrote: > > If we want to know the zone type, we have to check whether > > CONFIG_ZONE_DMA, CONFIG_ZONE_DMA32 and CONFIG_HIGHMEM are set or not, > > that's not so convenient. > > > > We'd better show the zone type directly. > > I do agree that zone number is quite PITA to process in general but do > we really need this information in the first place? Why do we even care? > Sometimes we want to know this event occurs in which zone, then we can get the information of this zone, for example via /proc/zoneinfo. It could give us more information for debugging. > Zones are an MM internal implementation details and the more we export > to the userspace the more we are going to argue about breaking userspace > when touching them. So I would rather not export that information unless > it is terribly useful. > I 'm not sure whether zone type is terribly useful or not, but the 'zid' is useless at all. I don't agree that Zones are MM internal. We can get the zone type in many ways, for example /proc/zoneinfo. If we show this event occurs in which zone, we'd better show the zone type, or we should drop this 'zid'. > > Signed-off-by: Yafang Shao > > --- > > include/trace/events/vmscan.h | 9 ++++++--- > > 1 file changed, 6 insertions(+), 3 deletions(-) > > > > diff --git a/include/trace/events/vmscan.h b/include/trace/events/vmscan.h > > index a1cb913..4c8880b 100644 > > --- a/include/trace/events/vmscan.h > > +++ b/include/trace/events/vmscan.h > > @@ -73,7 +73,10 @@ > > __entry->order = order; > > ), > > > > - TP_printk("nid=%d zid=%d order=%d", __entry->nid, __entry->zid, __entry->order) > > + TP_printk("nid=%d zid=%-8s order=%d", > > + __entry->nid, > > + __print_symbolic(__entry->zid, ZONE_TYPE), > > + __entry->order) > > ); > > > > TRACE_EVENT(mm_vmscan_wakeup_kswapd, > > @@ -96,9 +99,9 @@ > > __entry->gfp_flags = gfp_flags; > > ), > > > > - TP_printk("nid=%d zid=%d order=%d gfp_flags=%s", > > + TP_printk("nid=%d zid=%-8s order=%d gfp_flags=%s", > > __entry->nid, > > - __entry->zid, > > + __print_symbolic(__entry->zid, ZONE_TYPE), > > __entry->order, > > show_gfp_flags(__entry->gfp_flags)) > > ); > > -- > > 1.8.3.1 > > > > -- > Michal Hocko > SUSE Labs