Received: by 2002:ac0:950c:0:0:0:0:0 with SMTP id f12csp899008imc; Mon, 11 Mar 2019 01:48:21 -0700 (PDT) X-Google-Smtp-Source: APXvYqz20pp6PHbd7qfwQXSv2pQ9rQr7HRQDOyNl/61e0kLgLPAGwh2FltBEjBDmLPZ5AmVaElDA X-Received: by 2002:a17:902:be15:: with SMTP id r21mr32024934pls.143.1552294101047; Mon, 11 Mar 2019 01:48:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1552294101; cv=none; d=google.com; s=arc-20160816; b=kIcUSJFqmtY9KWE+vUUYX79d4pmNV46wmXf2vbPdM3E5rVjvL8EbwpwbSgu2cR1b/v p12B98469duYLaGik8ajW2P5PpcGMePgoiqYiS4j8mYluyqFFwEnvGB6amwB+wzrc1da wxO6UpuOOICXpUckDZH4RckV70TRWDlZi5Zgbo/9FI1Mi7NkPTQmjGo/JmxLErUtMVj8 htHYtLJmULsTohamELnsSEVoT8Sbc/RmZiJfji6wxRA0YBmxzhzYz/eywqEF/btNu3PC d0IndxiyRrtLZC7XJOe87lgjpA/FupD7ZReIbNQVSD0rMJx8pJIFpd1n8IzXKTfQ7LST N6/Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=IQliClByDtdpq2tK0UidAA17wxvL04QTsP8PR6jl6h4=; b=xA5irkFZeTzT5Q/dqPgWoeyd0iYVjUFxkDVZD+D8ahebtaH9u4ll3cWw+b0XfglQl9 dPY/ZQzo97cUlVpskut7GDeMrMFbkyF45rtsVnQ8yg5bJ2OODRGZ58peC28qVZmieFPu Tqhmh0pMFJVXIqxi3f/B5smwRJBEMRm0nBn8FScC6VpMkU6XMSpkDHU9B87mLWuI+z+G Hxeo3/umprTUGOvWgXAreO43r7BDv0vHPO8mdDETVhZCfYVkH2dTft5pZ1twcIzR4KIc w40cHnrtBk0Sae/or/IBUgZKfnGz/X95U80+B25NB8o0m5r4VJIWWhnLriRFAGNHt9+M /dTA== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h9si2183296pgq.57.2019.03.11.01.48.04; Mon, 11 Mar 2019 01:48:21 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726977AbfCKIrp (ORCPT + 99 others); Mon, 11 Mar 2019 04:47:45 -0400 Received: from mx2.suse.de ([195.135.220.15]:43006 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726631AbfCKIrp (ORCPT ); Mon, 11 Mar 2019 04:47:45 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 2FD81ACC8; Mon, 11 Mar 2019 08:47:44 +0000 (UTC) Date: Mon, 11 Mar 2019 09:47:43 +0100 From: Michal Hocko To: Yafang Shao Cc: vbabka@suse.cz, jrdr.linux@gmail.com, akpm@linux-foundation.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org, shaoyafang@didiglobal.com Subject: Re: [PATCH] mm: vmscan: show zone type in kswapd tracepoints Message-ID: <20190311084743.GX5232@dhcp22.suse.cz> References: <1551425934-28068-1-git-send-email-laoar.shao@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1551425934-28068-1-git-send-email-laoar.shao@gmail.com> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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? 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. > 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