From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1032495AbdAEGF7 (ORCPT ); Thu, 5 Jan 2017 01:05:59 -0500 Received: from LGEAMRELO12.lge.com ([156.147.23.52]:57049 "EHLO lgeamrelo12.lge.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1032415AbdAEGFH (ORCPT ); Thu, 5 Jan 2017 01:05:07 -0500 X-Original-SENDERIP: 156.147.1.126 X-Original-MAILFROM: minchan@kernel.org X-Original-SENDERIP: 10.177.223.161 X-Original-MAILFROM: minchan@kernel.org Date: Thu, 5 Jan 2017 15:04:58 +0900 From: Minchan Kim To: Michal Hocko Cc: Andrew Morton , Mel Gorman , Johannes Weiner , Vlastimil Babka , Hillf Danton , linux-mm@kvack.org, LKML , Michal Hocko Subject: Re: [PATCH 4/7] mm, vmscan: show LRU name in mm_vmscan_lru_isolate tracepoint Message-ID: <20170105060458.GC24371@bbox> References: <20170104101942.4860-1-mhocko@kernel.org> <20170104101942.4860-5-mhocko@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170104101942.4860-5-mhocko@kernel.org> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jan 04, 2017 at 11:19:39AM +0100, Michal Hocko wrote: > From: Michal Hocko > > mm_vmscan_lru_isolate currently prints only whether the LRU we isolate > from is file or anonymous but we do not know which LRU this is. > > It is useful to know whether the list is active or inactive, since we > are using the same function to isolate pages from both of them and it's > hard to distinguish otherwise. > > Chaneges since v1 > - drop LRU_ prefix from names and use lowercase as per Vlastimil > - move and convert show_lru_name to mmflags.h EM magic as per Vlastimil > > Acked-by: Hillf Danton > Acked-by: Mel Gorman > Signed-off-by: Michal Hocko > --- > include/trace/events/mmflags.h | 8 ++++++++ > include/trace/events/vmscan.h | 12 ++++++------ > mm/vmscan.c | 2 +- > 3 files changed, 15 insertions(+), 7 deletions(-) > > diff --git a/include/trace/events/mmflags.h b/include/trace/events/mmflags.h > index aa4caa6914a9..6172afa2fd82 100644 > --- a/include/trace/events/mmflags.h > +++ b/include/trace/events/mmflags.h > @@ -240,6 +240,13 @@ IF_HAVE_VM_SOFTDIRTY(VM_SOFTDIRTY, "softdirty" ) \ > IFDEF_ZONE_HIGHMEM( EM (ZONE_HIGHMEM,"HighMem")) \ > EMe(ZONE_MOVABLE,"Movable") > > +#define LRU_NAMES \ > + EM (LRU_INACTIVE_ANON, "inactive_anon") \ > + EM (LRU_ACTIVE_ANON, "active_anon") \ > + EM (LRU_INACTIVE_FILE, "inactive_file") \ > + EM (LRU_ACTIVE_FILE, "active_file") \ > + EMe(LRU_UNEVICTABLE, "unevictable") > + > /* > * First define the enums in the above macros to be exported to userspace > * via TRACE_DEFINE_ENUM(). > @@ -253,6 +260,7 @@ COMPACTION_STATUS > COMPACTION_PRIORITY > COMPACTION_FEEDBACK > ZONE_TYPE > +LRU_NAMES > > /* > * Now redefine the EM() and EMe() macros to map the enums to the strings > diff --git a/include/trace/events/vmscan.h b/include/trace/events/vmscan.h > index 36c999f806bf..7ec59e0432c4 100644 > --- a/include/trace/events/vmscan.h > +++ b/include/trace/events/vmscan.h > @@ -277,9 +277,9 @@ TRACE_EVENT(mm_vmscan_lru_isolate, > unsigned long nr_skipped, > unsigned long nr_taken, > isolate_mode_t isolate_mode, > - int file), > + int lru), It may break trace-vmscan-postprocess.pl. Other than that, Acked-by: Minchan Kim