From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753335AbcBOOSo (ORCPT ); Mon, 15 Feb 2016 09:18:44 -0500 Received: from mail-ob0-f194.google.com ([209.85.214.194]:32908 "EHLO mail-ob0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753231AbcBOOSm (ORCPT ); Mon, 15 Feb 2016 09:18:42 -0500 MIME-Version: 1.0 In-Reply-To: <20160215052855.GA2010@swordfish> References: <1455505490-12376-1-git-send-email-iamjoonsoo.kim@lge.com> <1455505490-12376-2-git-send-email-iamjoonsoo.kim@lge.com> <20160215050858.GA556@swordfish> <20160215052855.GA2010@swordfish> Date: Mon, 15 Feb 2016 23:18:42 +0900 Message-ID: Subject: Re: [PATCH 2/2] mm/page_ref: add tracepoint to track down page reference manipulation From: Joonsoo Kim To: Sergey Senozhatsky Cc: Andrew Morton , Michal Nazarewicz , Minchan Kim , Mel Gorman , Vlastimil Babka , "Kirill A. Shutemov" , Steven Rostedt , Linux Memory Management List , LKML , linux-api@vger.kernel.org, Joonsoo Kim Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 2016-02-15 14:28 GMT+09:00 Sergey Senozhatsky : > On (02/15/16 14:08), Sergey Senozhatsky wrote: >> >> will this compile with !CONFIG_TRACEPOINTS config? >> Yes, even if !CONFIG_TRACEPOINTS, it is compiled well. > uh.. sorry, was composed in email client. seems the correct way to do it is > > +#if defined CONFIG_DEBUG_PAGE_REF && defined CONFIG_TRACEPOINTS > > #include > > #define page_ref_tracepoint_active(t) static_key_false(&(t).key) > > extern struct tracepoint __tracepoint_page_ref_set; > ... > > extern void __page_ref_set(struct page *page, int v); > ... > > #else > > #define page_ref_tracepoint_active(t) false > > static inline void __page_ref_set(struct page *page, int v) > { > } > ... > > #endif > > > > or add a dependency of PAGE_REF on CONFIG_TRACEPOINTS in Kconfig. Thanks for catching it. I will add "depends on CONFIG_TRACEPOINTS" to Kconfig because this feature has no meaning if !CONFIG_TRACEPOINTS. Thanks.