Received: by 2002:ac0:950c:0:0:0:0:0 with SMTP id f12csp2223093imc; Tue, 12 Mar 2019 09:19:58 -0700 (PDT) X-Google-Smtp-Source: APXvYqyOGLmQ7IZ0jcWcPMWy68zbHH51eF0GhOj/G0fc4rGLMX1EI3JdT15wdXandfotgBBu6DgO X-Received: by 2002:aa7:9211:: with SMTP id 17mr39107534pfo.220.1552407598084; Tue, 12 Mar 2019 09:19:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1552407598; cv=none; d=google.com; s=arc-20160816; b=ZqbnuaNHf6qUpGnkMQRl59i3tDJStSYLSSAAgAd4LcBmvQ28KXifadDCwzQ6L3rja0 JTM7ZPTuUR5skl+SNAxF2SVt0sMxul+jVxhVo2SyPl5OHu3kdlJUlpOz63aa3BcfjfMz Q1wxhhWUiDG/516YWbqUou77/g69AoG+WKQFKPhpM5UcJ2f8YxS2KJ3tyWYxrtkLkR4e X2HcksCfFm0HkiFyixka0a2wwS78MMLzK8fYAFgu3BBgiD0SQGmr+ANynzYiNkarUGXB tzYygFDv4PMjKXGyiMgAtM5ZGkCDbVCEuINOeUwku3ZD0Sx3JLvkVowfm0IL+9M54KV8 nIeA== 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=Ex9/apj4g4KbhFyZOkV3xbOn6LnYjdACet6sO4R+t+4=; b=xZ+aaWEpBecRx6DH/V6gvjnTwtwihlBgI1X/m+GNTq1V6WA0grrea8Y6bseQJSSg1v 0zAudlCLtcbd1ZExZ9o1yC30pyhHvAx89N/VpEzgu9axH53IRdbY4nftLX6smn9Y1AMD jfQKSS7enVIpvtn2WdMZgxHGL0Z7J78EkSsIEacYO0hMdb93D9jPtswqUcIAfj4viHvY whufINPcHRL7K4KuAtw2iWbyEJkQWG6bLvqEj4jtfM2opbqIghwtUTqJ6bh+7FQTPZWM rPPOuod2buCjbeGpuhU7tEF/+FKULzHrcOtk5TaJ/GyBhBtVD6SA48xAD2R7rlFImKXS QrfA== 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 be6si8229097plb.414.2019.03.12.09.19.41; Tue, 12 Mar 2019 09:19:58 -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 S1726615AbfCLQSF (ORCPT + 99 others); Tue, 12 Mar 2019 12:18:05 -0400 Received: from mx2.suse.de ([195.135.220.15]:52328 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726329AbfCLQSF (ORCPT ); Tue, 12 Mar 2019 12:18:05 -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 7CA88AC3C; Tue, 12 Mar 2019 16:18:03 +0000 (UTC) Date: Tue, 12 Mar 2019 17:18:03 +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: compaction: some tracepoints should be defined only when CONFIG_COMPACTION is set Message-ID: <20190312161803.GC5721@dhcp22.suse.cz> References: <1551501538-4092-1-git-send-email-laoar.shao@gmail.com> <1551501538-4092-2-git-send-email-laoar.shao@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1551501538-4092-2-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 Sat 02-03-19 12:38:58, Yafang Shao wrote: > Only mm_compaction_isolate_{free, migrate}pages may be used when > CONFIG_COMPACTION is not set. > All others are used only when CONFIG_COMPACTION is set. Why is this an improvement? > Signed-off-by: Yafang Shao > --- > include/trace/events/compaction.h | 6 ++---- > 1 file changed, 2 insertions(+), 4 deletions(-) > > diff --git a/include/trace/events/compaction.h b/include/trace/events/compaction.h > index 6074eff..3e42078 100644 > --- a/include/trace/events/compaction.h > +++ b/include/trace/events/compaction.h > @@ -64,6 +64,7 @@ > TP_ARGS(start_pfn, end_pfn, nr_scanned, nr_taken) > ); > > +#ifdef CONFIG_COMPACTION > TRACE_EVENT(mm_compaction_migratepages, > > TP_PROTO(unsigned long nr_all, > @@ -132,7 +133,6 @@ > __entry->sync ? "sync" : "async") > ); > > -#ifdef CONFIG_COMPACTION > TRACE_EVENT(mm_compaction_end, > TP_PROTO(unsigned long zone_start, unsigned long migrate_pfn, > unsigned long free_pfn, unsigned long zone_end, bool sync, > @@ -166,7 +166,6 @@ > __entry->sync ? "sync" : "async", > __print_symbolic(__entry->status, COMPACTION_STATUS)) > ); > -#endif > > TRACE_EVENT(mm_compaction_try_to_compact_pages, > > @@ -195,7 +194,6 @@ > __entry->prio) > ); > > -#ifdef CONFIG_COMPACTION > DECLARE_EVENT_CLASS(mm_compaction_suitable_template, > > TP_PROTO(struct zone *zone, > @@ -296,7 +294,6 @@ > > TP_ARGS(zone, order) > ); > -#endif > > TRACE_EVENT(mm_compaction_kcompactd_sleep, > > @@ -352,6 +349,7 @@ > > TP_ARGS(nid, order, classzone_idx) > ); > +#endif > > #endif /* _TRACE_COMPACTION_H */ > > -- > 1.8.3.1 > -- Michal Hocko SUSE Labs