[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <f42807f7-2ad8-3f91-06ce-328e197a5fad@suse.cz>
Date: Tue, 20 Oct 2020 14:10:09 +0200
From: Vlastimil Babka <vbabka@...e.cz>
To: Steven Rostedt <rostedt@...dmis.org>, linux-kernel@...r.kernel.org
Cc: Yafang Shao <laoar.shao@...il.com>,
Axel Rasmussen <axelrasmussen@...gle.com>,
Andrew Morton <akpm@...ux-foundation.org>,
Michel Lespinasse <walken@...gle.com>,
Daniel Jordan <daniel.m.jordan@...cle.com>,
Davidlohr Bueso <dbueso@...e.de>,
Linux MM <linux-mm@...ck.org>, Ingo Molnar <mingo@...nel.org>,
Joonsoo Kim <iamjoonsoo.kim@....com>,
Michal Nazarewicz <mina86@...a86.com>,
Minchan Kim <minchan@...nel.org>,
Mel Gorman <mgorman@...hsingularity.net>,
"Kirill A. Shutemov" <kirill.shutemov@...ux.intel.com>,
Sergey Senozhatsky <sergey.senozhatsky.work@...il.com>,
Arnd Bergmann <arnd@...db.de>
Subject: Re: [PATCH 2/3 v2] mm/page_ref: Convert the open coded tracepoint
enabled to the new helper
On 9/25/20 11:12 PM, Steven Rostedt wrote:
> From: "Steven Rostedt (VMware)" <rostedt@...dmis.org>
>
> As more use cases of checking if a tracepoint is enabled in a header are
> coming to fruition, a helper macro, tracepoint_enabled(), has been added to
> check if a tracepoint is enabled or not, and can be used with minimal header
> requirements (avoid "include hell"). Convert the page_ref logic over to the
> new helper macro.
>
> Cc: Joonsoo Kim <iamjoonsoo.kim@....com>
> Cc: Michal Nazarewicz <mina86@...a86.com>
> Cc: Vlastimil Babka <vbabka@...e.cz>
> Cc: Minchan Kim <minchan@...nel.org>
> Cc: Mel Gorman <mgorman@...hsingularity.net>
> Cc: "Kirill A. Shutemov" <kirill.shutemov@...ux.intel.com>
> Cc: Sergey Senozhatsky <sergey.senozhatsky.work@...il.com>
> Cc: Arnd Bergmann <arnd@...db.de>
> Signed-off-by: Steven Rostedt (VMware) <rostedt@...dmis.org>
> ---
> include/linux/page_ref.h | 42 ++++++++++++++++++++--------------------
> 1 file changed, 21 insertions(+), 21 deletions(-)
>
> diff --git a/include/linux/page_ref.h b/include/linux/page_ref.h
> index d27701199a4d..f3318f34fc54 100644
> --- a/include/linux/page_ref.h
> +++ b/include/linux/page_ref.h
> @@ -7,13 +7,13 @@
> #include <linux/page-flags.h>
> #include <linux/tracepoint-defs.h>
>
> -extern struct tracepoint __tracepoint_page_ref_set;
> -extern struct tracepoint __tracepoint_page_ref_mod;
> -extern struct tracepoint __tracepoint_page_ref_mod_and_test;
> -extern struct tracepoint __tracepoint_page_ref_mod_and_return;
> -extern struct tracepoint __tracepoint_page_ref_mod_unless;
> -extern struct tracepoint __tracepoint_page_ref_freeze;
> -extern struct tracepoint __tracepoint_page_ref_unfreeze;
> +DECLARE_TRACEPOINT(page_ref_set);
> +DECLARE_TRACEPOINT(page_ref_mod);
> +DECLARE_TRACEPOINT(page_ref_mod_and_test);
> +DECLARE_TRACEPOINT(page_ref_mod_and_return);
> +DECLARE_TRACEPOINT(page_ref_mod_unless);
> +DECLARE_TRACEPOINT(page_ref_freeze);
> +DECLARE_TRACEPOINT(page_ref_unfreeze);
>
> #ifdef CONFIG_DEBUG_PAGE_REF
Not that it matters much, but the declarations could be below the #ifdef, AFAICS.
>
> @@ -24,7 +24,7 @@ extern struct tracepoint __tracepoint_page_ref_unfreeze;
> *
> * See trace_##name##_enabled(void) in include/linux/tracepoint.h
> */
> -#define page_ref_tracepoint_active(t) static_key_false(&(t).key)
> +#define page_ref_tracepoint_active(t) tracepoint_enabled(t)
The full comment above could now be deleted too?
Acked-by: Vlastimil Babka <vbabka@...e.cz>
Thanks!
Powered by blists - more mailing lists