From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4C25FC433F5 for ; Wed, 11 May 2022 02:48:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235127AbiEKCse (ORCPT ); Tue, 10 May 2022 22:48:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38128 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240221AbiEKCd2 (ORCPT ); Tue, 10 May 2022 22:33:28 -0400 Received: from out1.migadu.com (out1.migadu.com [IPv6:2001:41d0:2:863f::]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0E69D994EA; Tue, 10 May 2022 19:33:26 -0700 (PDT) Date: Tue, 10 May 2022 19:33:17 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1652236405; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=A/7S2Nfdl9mg+NTUlm8YRagGmVcuRP9spTCxvE0H5V8=; b=vBWdSRKNrRSnj63/2q34r3/NwsV2orkeonfypPwEqGznWLw2L0Fz8zfCr/hxvZ99MgLFvr WXMEKbGUubwgtQ2jbWiF1CSeAE8kxPdzTlzkXm3kZhuot9A3XTqfPMRehOC6DjskJh353p ILl2YaVkng/sfDDk+asuaFioScNzVjo= X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Roman Gushchin To: Vasily Averin Cc: Shakeel Butt , Steven Rostedt , Ingo Molnar , kernel@openvz.org, linux-kernel@vger.kernel.org, Vlastimil Babka , Michal Hocko , cgroups@vger.kernel.org, Andrew Morton , Dennis Zhou , Tejun Heo , Christoph Lameter , linux-mm@kvack.org Subject: Re: [PATCH v2] percpu: improve percpu_alloc_percpu event trace Message-ID: References: <2b388d09-940e-990f-1f8a-2fdaa9210fa0@openvz.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Migadu-Flow: FLOW_OUT X-Migadu-Auth-User: linux.dev Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, May 06, 2022 at 10:29:25PM +0300, Vasily Averin wrote: > Added call_site, bytes_alloc and gfp_flags fields to the output > of the percpu_alloc_percpu ftrace event: > > mkdir-4393 [001] 169.334788: percpu_alloc_percpu: > call_site=mem_cgroup_css_alloc+0xa6 reserved=0 is_atomic=0 size=2408 align=8 > base_addr=0xffffc7117fc00000 off=402176 ptr=0x3dc867a62300 bytes_alloc=14448 > gfp_flags=GFP_KERNEL_ACCOUNT > > This is required to track memcg-accounted percpu allocations. > > Signed-off-by: Vasily Averin Acked-by: Roman Gushchin LGTM, thanks Vasily! One minor thing below. > --- > v2: added call_site, improved patch description > --- > include/trace/events/percpu.h | 23 +++++++++++++++++------ > mm/percpu-internal.h | 8 ++++---- > mm/percpu.c | 5 +++-- > 3 files changed, 24 insertions(+), 12 deletions(-) > > diff --git a/include/trace/events/percpu.h b/include/trace/events/percpu.h > index df112a64f6c9..e989cefc0def 100644 > --- a/include/trace/events/percpu.h > +++ b/include/trace/events/percpu.h > @@ -6,15 +6,20 @@ > #define _TRACE_PERCPU_H > > #include > +#include > > TRACE_EVENT(percpu_alloc_percpu, > > - TP_PROTO(bool reserved, bool is_atomic, size_t size, > - size_t align, void *base_addr, int off, void __percpu *ptr), > + TP_PROTO(unsigned long call_site, > + bool reserved, bool is_atomic, size_t size, > + size_t align, void *base_addr, int off, > + void __percpu *ptr, size_t bytes_alloc, gfp_t gfp_flags), Don't we want to preserve the order and add the call_site at the end? Trace events are not ABI, but if we don't have a strong reason to break it, I'd preserve the old order. Thanks!