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 kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id D901CC433F5 for ; Wed, 25 May 2022 07:33:32 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 2277B8D0005; Wed, 25 May 2022 03:33:32 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 1DB648D0002; Wed, 25 May 2022 03:33:32 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 0EFA18D0005; Wed, 25 May 2022 03:33:32 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0015.hostedemail.com [216.40.44.15]) by kanga.kvack.org (Postfix) with ESMTP id 01CF28D0002 for ; Wed, 25 May 2022 03:33:32 -0400 (EDT) Received: from smtpin29.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay01.hostedemail.com (Postfix) with ESMTP id D017A60926 for ; Wed, 25 May 2022 07:33:31 +0000 (UTC) X-FDA: 79503450222.29.44D49A9 Received: from mail-il1-f182.google.com (mail-il1-f182.google.com [209.85.166.182]) by imf26.hostedemail.com (Postfix) with ESMTP id 94E5B14001D for ; Wed, 25 May 2022 07:33:23 +0000 (UTC) Received: by mail-il1-f182.google.com with SMTP id o16so13334210ilq.8 for ; Wed, 25 May 2022 00:33:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=D1QXg+ZJxZudpo1DLstJUE5WBMRrsF/kSmhiXxVx99g=; b=C3jipImfWMy0knV4R4k3AKeVpp76f40sy0D0as6hH44YK1UzFCKRf7cS/QNTBbczMn hcFTxMwpr/B7E+lBCvsRf9XCHjL7keB28QXAyRwz+7Pqd5VRa/+/ejR/4NdQVNpFT7Tl 1zWyYpjOA4l5L/Mmgog6fCPTVvoxhSpr+KPC2qWWM1bGZ3kSeB+USL/7l6z1ZIrcn2ID 7sPhp6ITjYueLKpLVWDj8S89l9MzJ4eR2B4ZoPbLAeCSGpm6CWikJBcVFNQVDYhxV/L9 vwRtFsnwMRJqo9MvSLV7EFe6O0zG06U1eiT5cHuL+l/ZZC6GGksth7ubDHC6Fm3Q48iC qoEg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=D1QXg+ZJxZudpo1DLstJUE5WBMRrsF/kSmhiXxVx99g=; b=Era66KE9Gr9CPoeexgcQIaG3Xc7sh+a5IEgDxWZ0phTKyecWMhCOLnQd96dGBHW3TG aQR0z1ojSswQbANo1K/h+KQ7CLy2837J5N2aBq5GLvH8YCT8/evYzgcXP/r1wsxPzCZ7 Ie9MWM1xPnPn3CI+shdjNBqKxxhvgpKQ7CWIwDf2QNtyIeKYhKTdHLmdrywJ/AqbjenQ lJrPWBMo783svoI7Ry11J1QJ7k3ah41v7llGAADW4aMqCVO74NteaUvLuLhS5xLDi6/J r5jNWEQWbGp+D4LmPn0KpGU69N1MOxlP4XEM2GWG7z3hCCQ621qg7Dy6fNmAFjVlcfCW M/qg== X-Gm-Message-State: AOAM532drHtMVO1GZF+A7MPLjSw8gP/S3iPJ4NggJRPxxU+rFdmJ+93H xTLk12nthOZ4MW7Aiso0bgo= X-Google-Smtp-Source: ABdhPJwvk+1xyN+3GXu5wm8Xm5+t4z6lhRUaBaOEQ1H+HED9EnYcEwZ767GhpfDGMWqqWAQ0KL8p9Q== X-Received: by 2002:a05:6e02:168f:b0:2cf:166b:bb10 with SMTP id f15-20020a056e02168f00b002cf166bbb10mr15762006ila.89.1653464006684; Wed, 25 May 2022 00:33:26 -0700 (PDT) Received: from n2.us-central1-a.c.spheric-algebra-350919.internal (151.16.70.34.bc.googleusercontent.com. [34.70.16.151]) by smtp.gmail.com with ESMTPSA id q5-20020a0566022f0500b00665862d12bbsm471242iow.46.2022.05.25.00.33.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 25 May 2022 00:33:25 -0700 (PDT) Date: Wed, 25 May 2022 07:33:24 +0000 From: Hyeonggon Yoo <42.hyeyoo@gmail.com> To: Vasily Averin Cc: Andrew Morton , kernel@openvz.org, linux-kernel@vger.kernel.org, Steven Rostedt , Ingo Molnar , linux-mm@kvack.org, Shakeel Butt , Roman Gushchin , Vlastimil Babka , Matthew Wilcox , Joonsoo Kim , David Rientjes , Pekka Enberg , Christoph Lameter , Michal Hocko , Muchun Song Subject: Re: [PATCH v4] tracing: add 'accounted' entry into output of allocation tracepoints Message-ID: References: <0c73ce5c-3625-6187-820e-1277e168b3bc@openvz.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Stat-Signature: rhwbmtwkqfezuhbmaonpncs53tjyiokh X-Rspam-User: Authentication-Results: imf26.hostedemail.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=C3jipImf; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (imf26.hostedemail.com: domain of 42.hyeyoo@gmail.com designates 209.85.166.182 as permitted sender) smtp.mailfrom=42.hyeyoo@gmail.com X-Rspamd-Server: rspam09 X-Rspamd-Queue-Id: 94E5B14001D X-HE-Tag: 1653464003-504688 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Sat, May 21, 2022 at 09:36:54PM +0300, Vasily Averin wrote: > Slab caches marked with SLAB_ACCOUNT force accounting for every > allocation from this cache even if __GFP_ACCOUNT flag is not passed. > Unfortunately, at the moment this flag is not visible in ftrace output, > and this makes it difficult to analyze the accounted allocations. > > This patch adds boolean "accounted" entry into trace output, > and set it to 'true' for calls used __GFP_ACCOUNT flag and > for allocations from caches marked with SLAB_ACCOUNT. > > Signed-off-by: Vasily Averin > Acked-by: Shakeel Butt > --- Maybe I worried a bit much... I failed to apply it on slab/for-next and v5.18. What tree is it based on? > v4: > 1) replaced in patch descripion: "accounted" instead of "allocated" > 2) added "Acked-by" from Shakeel, > 3) re-addressed to akpm@ > > v3: > 1) rework kmem_cache_alloc* tracepoints once again, > added struct kmem_cache argument into existing templates, > thanks to Matthew Wilcox > 2) updated according trace_* calls > 3) added boolean "allocated" entry into trace output, > thanks to Roman > 4) updated patch subject and description > > v2: > 1) handle kmem_cache_alloc_node(), thanks to Shakeel > 2) rework kmem_cache_alloc* tracepoints to use cachep instead > of current cachep->*size parameters. > NB: kmem_cache_alloc_node tracepoint in SLOB cannot use cachep, > and therefore it was replaced by kmalloc_node. > --- > include/trace/events/kmem.h | 38 +++++++++++++++++++++++-------------- > mm/slab.c | 10 +++++----- > mm/slab_common.c | 9 ++++----- > mm/slob.c | 8 ++++---- > mm/slub.c | 20 +++++++++---------- > 5 files changed, 47 insertions(+), 38 deletions(-)