Received: by 2002:a05:6358:45e:b0:b5:b6eb:e1f9 with SMTP id 30csp1353279rwe; Thu, 1 Sep 2022 17:31:31 -0700 (PDT) X-Google-Smtp-Source: AA6agR57rHki7Ovb2puasCDJCbhxEHKMXMiDA1/WfQHBsYj/Xtt8yKYR4lpyuMnA40uduQTk6rxc X-Received: by 2002:a17:906:6a1d:b0:73f:2bd3:b342 with SMTP id qw29-20020a1709066a1d00b0073f2bd3b342mr22046266ejc.604.1662078690868; Thu, 01 Sep 2022 17:31:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1662078690; cv=none; d=google.com; s=arc-20160816; b=dgwlZjZdUXjgKa0xmlDSCm+n6p/rSsnSvmV/QJ1jPz+WKpSnXFcoNWGT6jFwtGXDoh kg9qW1wnqF+M95rRD551LUZJLSNJyOT8OVzs2l2W5/xJPbuULz1MWEPg2jUs75v0EAMX uADxyAdgy63RI7v7MGWYvOApIBUhCP8PRwKmJJtWrfLj5+5I3YQ1sIVFGE8NFggLF/t0 83JH4bjGQh3407cAJyr13NUGsvtIMP48hYxWV6YWNYqO4eL7z1dZsDWI0O/dHIrhiTrc 4kQyBlYpwqMkj+S2tlbNp2tm6skw1/MSMz0xsEjmzXxu0rP7dxGg66qt6g4Fd6yn2oUW X+6Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:dkim-signature:date; bh=QeZ3ywOHO+ue61+bhlHhVrcPOQCnKvUeLhu9G4GOySc=; b=LRX9eJTxnvSw+MocEf70n0OtgDX9EQvuhklwCGc5t4BFuUM8h5v3adHUHhmIwZzz2W +nu9Z7AlHVVtDrbUmDjBPj5tC3IX+5fCMeWHGe3I45DavvvG4cUKBwE3LGgAdIgv3qtU oBZIfZ+kwXTrdFCGVLVZV1nDML0JWd0KS9FtPCztx8VpPx64+paif4PSs5Af8vPlK30e 4x3VsTHqtMTSRz0JzKelagRIM/uaEbewpN0nufeEaVqR3d465d0oBKLkxdiQlD9Z9Gp8 ZVFxwVVBQLR+mdTDzWIxXTy62QBv5OmYJAdBoOm8AhRb4UDj8ZuZ72+Mha4yCI08ESJk nqZw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=sadkhbMj; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id z23-20020a170906435700b0073305fd2278si490897ejm.864.2022.09.01.17.31.04; Thu, 01 Sep 2022 17:31:30 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=sadkhbMj; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234544AbiIAXuo (ORCPT + 99 others); Thu, 1 Sep 2022 19:50:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35124 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234405AbiIAXuj (ORCPT ); Thu, 1 Sep 2022 19:50:39 -0400 Received: from out0.migadu.com (out0.migadu.com [IPv6:2001:41d0:2:267::]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2CC053335B; Thu, 1 Sep 2022 16:50:38 -0700 (PDT) Date: Thu, 1 Sep 2022 16:50:10 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1662076236; 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=QeZ3ywOHO+ue61+bhlHhVrcPOQCnKvUeLhu9G4GOySc=; b=sadkhbMj3kQoxTU4Z0wL0RXHLY5y6xZiwOqubD8PoxvVg4LGYu+qUdek9jYhqs8dE5qisD cPrzl5F8o1AtoFcEb462CJ9ApSsv/yCMwGqAUCTFZ6Dxme6pBqRmTDZBKFxUtWhaf3KJSH DvKiilEWiSx7n4WVSBJXR8PEuxO/ReU= X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Roman Gushchin To: Suren Baghdasaryan Cc: akpm@linux-foundation.org, kent.overstreet@linux.dev, mhocko@suse.com, vbabka@suse.cz, hannes@cmpxchg.org, mgorman@suse.de, dave@stgolabs.net, willy@infradead.org, liam.howlett@oracle.com, void@manifault.com, peterz@infradead.org, juri.lelli@redhat.com, ldufour@linux.ibm.com, peterx@redhat.com, david@redhat.com, axboe@kernel.dk, mcgrof@kernel.org, masahiroy@kernel.org, nathan@kernel.org, changbin.du@intel.com, ytcoode@gmail.com, vincent.guittot@linaro.org, dietmar.eggemann@arm.com, rostedt@goodmis.org, bsegall@google.com, bristot@redhat.com, vschneid@redhat.com, cl@linux.com, penberg@kernel.org, iamjoonsoo.kim@lge.com, 42.hyeyoo@gmail.com, glider@google.com, elver@google.com, dvyukov@google.com, shakeelb@google.com, songmuchun@bytedance.com, arnd@arndb.de, jbaron@akamai.com, rientjes@google.com, minchan@google.com, kaleshsingh@google.com, kernel-team@android.com, linux-mm@kvack.org, iommu@lists.linux.dev, kasan-dev@googlegroups.com, io-uring@vger.kernel.org, linux-arch@vger.kernel.org, xen-devel@lists.xenproject.org, linux-bcache@vger.kernel.org, linux-modules@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [RFC PATCH 16/30] mm: enable slab allocation tagging for kmalloc and friends Message-ID: References: <20220830214919.53220-1-surenb@google.com> <20220830214919.53220-17-surenb@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220830214919.53220-17-surenb@google.com> X-Migadu-Flow: FLOW_OUT X-Migadu-Auth-User: linux.dev X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW,SPF_HELO_PASS, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham 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 Tue, Aug 30, 2022 at 02:49:05PM -0700, Suren Baghdasaryan wrote: > Redefine kmalloc, krealloc, kzalloc, kcalloc, etc. to record allocations > and deallocations done by these functions. One particular case when this functionality might be very useful: in the past we've seen examples (at Fb) where it was hard to understand the difference between slab memory sizes of two different kernel versions due to slab caches merging. Once a slab cache is merged with another large cache, this data is pretty much lost. So I definetely see value in stats which are independent from kmem caches. The performance overhead is a concern here, so more data would be useful. Thanks!