Received: by 2002:a19:771d:0:0:0:0:0 with SMTP id s29csp1247030lfc; Wed, 1 Jun 2022 13:00:17 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz1cxy5JCcYUdLBNxp9fMmEaRNcpKduMmIHF+Cnor6hHtqHdwEwK0rH/uJ/91xOIfBkzca9 X-Received: by 2002:a17:902:e74d:b0:163:783a:3473 with SMTP id p13-20020a170902e74d00b00163783a3473mr1060841plf.17.1654113617712; Wed, 01 Jun 2022 13:00:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654113617; cv=none; d=google.com; s=arc-20160816; b=SpLRE3Hzh8JT2Xs+las1MqK5YW4y1pcsuhgBvoy/mshTl/tm4MHzGORPGHspiJ0wlx y86DZmr3cy+kIgUJ3LwIXJLj1DKoJEVlzmKHYDKHebQ4Fa82QGF1tz4I0Tn1FnCn2FqY 201M11Eiksa70CBZqsJsA+CfjY1CPw0H1UoB8rX+EOA0xqwB/YL+jyFAwzbZFvDKwIkq K6bzSpG6RJNrZr/8ihBvqZX3dcZmOloipwzr5yCNbbfFX/R1wtVewZ03cJpokq2CK4qY vWDLuPuJUBl/P+eY+FSn3OVxFZwhAQfuiCby9VvbEzvXwdeo8oU69aEUdiq4em7VXy3K BOfg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=y/aNKJXZWqRuqPNJq3hEjocGGUwSzRQP7BmWbTX4fYk=; b=Ippt9NApdnQBDVl7rPpLALlH9xKiaP9vpG9aaSFYUM6VfUxQWKiXugMSCxkcEWmm9t rJwIS7wThZONnyIyLJzNujfZIErbPxM8VmlAxHkRNe/XEly8e/3B9saeuVoPywVhZpNN wg/U+6BKhN2fTz0eswaVQx4ZFe+Pv75tLMCnv6jN66RvWlr9HZ3xCj49th2EWADpLeGt 65a9s5xIF1tAZUflxmmw+QSfrnnhnGI3MGAroT7yKvdlNcS2CzlPH5NUXAXTGuLSeRnV khP5UT1M1gq4evYpcdImqjif/yW8b9X3tnf+xUIVr4LNzToYuYLXFrgV8yudn8d/Pl8Y ea2A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@openvz-org.20210112.gappssmtp.com header.s=20210112 header.b=4fhxtldU; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=openvz.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id q15-20020a056a00150f00b0051870830bcdsi3089275pfu.85.2022.06.01.13.00.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 01 Jun 2022 13:00:17 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@openvz-org.20210112.gappssmtp.com header.s=20210112 header.b=4fhxtldU; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=openvz.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 5E042222A79; Wed, 1 Jun 2022 12:18:45 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346241AbiEaQ60 (ORCPT + 99 others); Tue, 31 May 2022 12:58:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40518 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1346242AbiEaQ6Y (ORCPT ); Tue, 31 May 2022 12:58:24 -0400 Received: from mail-lf1-x136.google.com (mail-lf1-x136.google.com [IPv6:2a00:1450:4864:20::136]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 879922E6AC for ; Tue, 31 May 2022 09:58:22 -0700 (PDT) Received: by mail-lf1-x136.google.com with SMTP id s6so6477125lfo.13 for ; Tue, 31 May 2022 09:58:22 -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=y/aNKJXZWqRuqPNJq3hEjocGGUwSzRQP7BmWbTX4fYk=; b=4fhxtldUto8lIjf5Vd/ncQaAJRtTe9kfVGUB4asPKmakTApkAdCaPdi7Bfcu0KbGjo kD49uDvDW9Xzc41t6h1FLF1KalEudS0DGuprg5CxMTW99WTyFQ9rgeAEWNJSQ314icL2 uEiI2vAgVsL0gbqL/huVqVMIF1m2OMJQvdptH/2DFrK4SBICbnNytIj/nxHMm1P3Jwaa EtldNWqKYWWlp3BKACGbSLZzh42nyIh//5qMl2jzMm3GlLAZAyHfdzVFFc9pl0Clt3ly JgGXUV1y2Qz0h3WH1ginmZ2kzSEHRS1SRECRWsgWRGXq5Sy4YeqBiqrNF8ikQmg3Wlqx gd/A== 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=y/aNKJXZWqRuqPNJq3hEjocGGUwSzRQP7BmWbTX4fYk=; b=Ilui+TJeaDMSUTVYIB23IWWx62n3ftidQzEs94hdaTkU9lJLU4gcsf5DSV4RQcH9pC 161c9UA+hzmavNoc8fUQPdIVBDtMObMix7E6Ar6w0mkQ8J1dLVCt0xH455LzpslYd8yC Py7IGbYAxLgIKUzeMXbw1I6mB/rdUyBAS0zFJboQEVB4pFJbnmV+RAGj7xAabKliIx4S Uc3Yf6CY8V7aPIXwUEgcO1tGJkCIMiKlt1oj4/bCRlOu6zz/OQOgSVOWP+8TAlldAyec T1xktft9mGUkDo9yq0d/xmcShSo4Jn9kIYF7vmke9p2GJV26Bm1/Z5mnpuLVMiG5QLcm k5DA== X-Gm-Message-State: AOAM530EDqErEFVAiIC0P1YjoTH4+EZhToSH8mIKXvQtE0IZrQl3lHlq Re5t1rKbartpRLg50IcsDR2ljw== X-Received: by 2002:a05:6512:a95:b0:478:82fb:7783 with SMTP id m21-20020a0565120a9500b0047882fb7783mr28720432lfu.471.1654016300830; Tue, 31 May 2022 09:58:20 -0700 (PDT) Received: from [192.168.1.65] ([46.188.121.129]) by smtp.gmail.com with ESMTPSA id j5-20020a05651231c500b0047255d2115fsm3063876lfe.142.2022.05.31.09.58.19 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 31 May 2022 09:58:20 -0700 (PDT) Message-ID: Date: Tue, 31 May 2022 19:58:18 +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 v5] tracing: add 'accounted' entry into output of allocation tracepoints Content-Language: en-US To: Hyeonggon Yoo <42.hyeyoo@gmail.com> Cc: Vlastimil Babka , kernel@openvz.org, linux-kernel@vger.kernel.org, Steven Rostedt , Ingo Molnar , Andrew Morton , linux-mm@kvack.org, Shakeel Butt , Roman Gushchin , Matthew Wilcox , Joonsoo Kim , David Rientjes , Pekka Enberg , Christoph Lameter , Michal Hocko , Muchun Song References: <80bcb043-3782-1d81-d8a2-4bdcb213cf30@openvz.org> From: Vasily Averin In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-3.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, NICE_REPLY_A,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 5/31/22 14:46, Hyeonggon Yoo wrote: > On Mon, May 30, 2022 at 10:47:26AM +0300, Vasily Averin wrote: > Looks good to me. > Reviewed-by: Hyeonggon Yoo <42.hyeyoo@gmail.com> > > a small comment: >> >> TP_fast_assign( >> @@ -33,42 +35,46 @@ DECLARE_EVENT_CLASS(kmem_alloc, >> __entry->bytes_req = bytes_req; >> __entry->bytes_alloc = bytes_alloc; >> __entry->gfp_flags = (__force unsigned long)gfp_flags; >> + __entry->accounted = (gfp_flags & __GFP_ACCOUNT) || >> + (s && s->flags & SLAB_ACCOUNT); >> ), >> > > It doesn't make sense for SLOB to print accounted=true because SLOB does > not support object accounting. Thank you very much for this comment. SLAB_ACCOUNT is not defined for SLOB, but __GFP_ACCOUNT really can incorrectly set this field to true. I'll think how to handle this correctly. Thank you, Vasily Averin