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 9A575C433F5 for ; Wed, 25 May 2022 08:24:08 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 278E68D0002; Wed, 25 May 2022 04:24:08 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 223BF8D0001; Wed, 25 May 2022 04:24:08 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 112938D0002; Wed, 25 May 2022 04:24:08 -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 F01E78D0001 for ; Wed, 25 May 2022 04:24:07 -0400 (EDT) Received: from smtpin10.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay13.hostedemail.com (Postfix) with ESMTP id C701E60EED for ; Wed, 25 May 2022 08:24:07 +0000 (UTC) X-FDA: 79503577734.10.A4BAC28 Received: from mail-lj1-f175.google.com (mail-lj1-f175.google.com [209.85.208.175]) by imf15.hostedemail.com (Postfix) with ESMTP id 7301FA0002 for ; Wed, 25 May 2022 08:23:47 +0000 (UTC) Received: by mail-lj1-f175.google.com with SMTP id h10so2311027ljb.6 for ; Wed, 25 May 2022 01:24:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=openvz-org.20210112.gappssmtp.com; s=20210112; h=message-id:date:mime-version:user-agent:subject:content-language:to :cc:references:from:in-reply-to:content-transfer-encoding; bh=DMih3PC0CUqNRPymP7jF28Tc6uD8L1kbcREW7ZOtPzM=; b=DXRhYssez6mYWo3RiP2+AvTIdvjhEuQ4cgCcaqri67O0rmNvafyZet7dKjXHq2U/R9 kIGEoSp4H76gPv0OYfzjlJkvVLqi4Gu9lR5X/Hus5noIlybYVGg62qR1q/dXhPZB2ux4 VLG97plIRrljuc5e/GYgPBJ4TkWL9TMSJNu8103P9TcVkrawhxKg902EKfDZXJDYl+Pw Fyq14hDuVhJk5gZaskd4NiZG8Q7No4LGpgxYFS1vDKM05c7q4ButzqjpdEt1/5Xqjqto EQ2HBkrH7SQai4z0mKiNErALyj4UPusOlAXO+Hcdh6zDDcnEkz/uW28IHR00VHxMRexQ BCnQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:subject :content-language:to:cc:references:from:in-reply-to :content-transfer-encoding; bh=DMih3PC0CUqNRPymP7jF28Tc6uD8L1kbcREW7ZOtPzM=; b=UuObo/p5vd3qc1lB9B+cAixSE7YH5BWBDrxGGJCPf68Gr/HVFWf1abH8yfK64rsd9V onFhPjfdeiVKrHMBwASmd0U4sjdeHYF2kAAOZA6PUgCoQzbrxDI+yFkvBgHR/De8NP9v h28NW4HfLg4RHW4k3Io5tQ4S0MTEuer/AZZPG4NpRZzC7hS9wck/b6F3FrL421Q6ntuu wOVAHxgnstTuCNsZjor2xxsZRONrq6Zponfu6Kbk7gd+FbaGKqKgLRwdnr59BLOmGQaw OhmQZSbPrYrEWQnIwrfzIg77x5A1NZgu23pI2jaw43o4WY7YryM8q1rkUUMjwrq6oF0u GRxg== X-Gm-Message-State: AOAM531HaRkD1mKHlG8cTd30H8D7XUY1yNIoU4tK4sQg91LpPLAHeKiS oPxtoiRQbD0pwOR54x/vxcM1Pg== X-Google-Smtp-Source: ABdhPJytZeflucAMgt5ZqAvbLSpaDCd3WARNL/P3DHjs7Xt/BWUXw+If3GtRUCDjo+tWA7WG80CCeQ== X-Received: by 2002:a2e:9c88:0:b0:253:d542:6a1f with SMTP id x8-20020a2e9c88000000b00253d5426a1fmr17197661lji.499.1653467045028; Wed, 25 May 2022 01:24:05 -0700 (PDT) Received: from [192.168.1.65] ([46.188.121.129]) by smtp.gmail.com with ESMTPSA id x26-20020ac2489a000000b0047255d21111sm2976583lfc.64.2022.05.25.01.24.03 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 25 May 2022 01:24:04 -0700 (PDT) Message-ID: <54ea7fb0-69da-1a9d-1dc1-58cea852f41b@openvz.org> Date: Wed, 25 May 2022 11:24:02 +0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.8.1 Subject: Re: [PATCH v4] tracing: add 'accounted' entry into output of allocation tracepoints Content-Language: en-US To: Hyeonggon Yoo <42.hyeyoo@gmail.com> 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 References: <0c73ce5c-3625-6187-820e-1277e168b3bc@openvz.org> From: Vasily Averin In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Rspamd-Server: rspam12 X-Rspamd-Queue-Id: 7301FA0002 X-Stat-Signature: he5eyyq98m7wyszn7qwbg6ciepw1nmuo Authentication-Results: imf15.hostedemail.com; dkim=pass header.d=openvz-org.20210112.gappssmtp.com header.s=20210112 header.b=DXRhYsse; spf=pass (imf15.hostedemail.com: domain of vvs@openvz.org designates 209.85.208.175 as permitted sender) smtp.mailfrom=vvs@openvz.org; dmarc=pass (policy=none) header.from=openvz.org X-Rspam-User: X-HE-Tag: 1653467027-524940 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 5/25/22 10:33, Hyeonggon Yoo wrote: > 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? Its context depends on changes in my other patches already included into mm-unstable. >> 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(-)