From patchwork Wed Mar 2 17:31:16 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vlastimil Babka X-Patchwork-Id: 12766413 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 270C2C433FE for ; Wed, 2 Mar 2022 17:31:39 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 9277D8D0002; Wed, 2 Mar 2022 12:31:38 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 8B04E8D0001; Wed, 2 Mar 2022 12:31:38 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 752B58D0002; Wed, 2 Mar 2022 12:31:38 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (relay.hostedemail.com [64.99.140.26]) by kanga.kvack.org (Postfix) with ESMTP id 6374C8D0001 for ; Wed, 2 Mar 2022 12:31:38 -0500 (EST) Received: from smtpin02.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay08.hostedemail.com (Postfix) with ESMTP id 42B8522315 for ; Wed, 2 Mar 2022 17:31:38 +0000 (UTC) X-FDA: 79200138276.02.F54A38C Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) by imf24.hostedemail.com (Postfix) with ESMTP id 458FB180027 for ; Wed, 2 Mar 2022 17:31:37 +0000 (UTC) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id E875D1F383; Wed, 2 Mar 2022 17:31:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1646242295; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=0F5iyAVUpAY+shMoqL/P7qWmQAtpvgs1Tiry295pM+U=; b=STDpbQqNfuoclYWu1flEt6xiogDYgw/jahRqnhJs9cK87PLSUvfIKppRaCH7FuAXbiMCqM AwfLU4mrR1+alT3s68x2Mkcx4xKIRpUtGAOYFzGuRSDSNQNlp72BvPdTmlAkyTI8LbHiQ/ Pg+6a+l9z985ZWnxo19PI9gqw+oZ2/w= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1646242295; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=0F5iyAVUpAY+shMoqL/P7qWmQAtpvgs1Tiry295pM+U=; b=9bxUMlg/FV7BId79ULVCflh5Tz4oSYISm1grmEs19YkBkUoRvI08W1xir84/GppMSgnTPi 4ONboN4A095HgVDQ== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 9068D13A89; Wed, 2 Mar 2022 17:31:35 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id TNSNIvepH2LPTAAAMHmgww (envelope-from ); Wed, 02 Mar 2022 17:31:35 +0000 From: Vlastimil Babka To: David Rientjes , Christoph Lameter , Joonsoo Kim , Pekka Enberg , Roman Gushchin Cc: Andrew Morton , linux-mm@kvack.org, patches@lists.linux.dev, linux-kernel@vger.kernel.org, Oliver Glitta , Faiyaz Mohammed , Marco Elver , Mike Rapoport , Hyeonggon Yoo <42.hyeyoo@gmail.com>, Imran Khan , Vlastimil Babka , Jonathan Corbet , Randy Dunlap Subject: [PATCH v2 0/6] SLUB debugfs improvements based on stackdepot Date: Wed, 2 Mar 2022 18:31:16 +0100 Message-Id: <20220302173122.11939-1-vbabka@suse.cz> X-Mailer: git-send-email 2.35.1 MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=2368; h=from:subject; bh=B+yzyYiHDPGnwrNbtx8qgY0ZG8Ue2zyPZEAU7+tMVJc=; b=owEBbQGS/pANAwAIAeAhynPxiakQAcsmYgBiH6nkvl6LWPKdV0YYkWFgwkLcDQYi6hxSzz0tQNuq uJds8I2JATMEAAEIAB0WIQSNS5MBqTXjGL5IXszgIcpz8YmpEAUCYh+p5AAKCRDgIcpz8YmpEN5kCA CKf3q/CXp6s4z3xEGDGcxr7+KOTzPVsE2Lapbf0IIxJLhr51st5EtMorZEvAdqbjzdU79TH5rpLFxD 2t3JKjY5KpTsxs+1r1fX6zmi7xMAb23OPkCveN3KNrTdGUbSce8GwVTsvW1ihVfNvfunIz8UI5WNFS uByr0OiQwn6fololkU1zyNhTzvEQ0Ym1tYM84H4BGyFJ4Tre99dktMGBEBfWwvi3vxY8HKU/PwYXri C1M0GTRReU1kyr5j9E59sDe1mvIJ5eVBvRhHzUt7sfyZ1/XYkZ9gk6x8lpuy5iwP9GEKn4YwP6nvyT D2O9ALr20voAdAAXHaqdC0Ka9hcKXX X-Developer-Key: i=vbabka@suse.cz; a=openpgp; fpr=A940D434992C2E8E99103D50224FA7E7CC82A664 X-Rspam-User: X-Rspamd-Server: rspam04 X-Rspamd-Queue-Id: 458FB180027 X-Stat-Signature: 3g681x33ugoguisu8q5hzrjnfxba36qi Authentication-Results: imf24.hostedemail.com; dkim=pass header.d=suse.cz header.s=susede2_rsa header.b=STDpbQqN; dkim=pass header.d=suse.cz header.s=susede2_ed25519 header.b="9bxUMlg/"; spf=pass (imf24.hostedemail.com: domain of vbabka@suse.cz designates 195.135.220.29 as permitted sender) smtp.mailfrom=vbabka@suse.cz; dmarc=none X-HE-Tag: 1646242297-56254 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: Changes since v1: https://lore.kernel.org/all/20220225180318.20594-1-vbabka@suse.cz/ - New Patch 1 to resolve bootstrap issues between stack depot and early cache creation reported by Hyeonggon Yoo - Patch 3 use GFP_NOWAIT always in set_track to avoid sleeping in invalid context, reported by Hyeonggon Yoo - Addressed minor feedback and added review/tests by Hyeonggon Yoo. Hi, this series combines and revives patches from Oliver's last year bachelor thesis (where I was the advisor) that make SLUB's debugfs files alloc_traces and free_traces more useful. The resubmission was blocked on stackdepot changes that are now merged, as explained in patch 3. Patch 1 makes it possible to use stack depot without bootstrap issues. Patch 2 is a new preparatory cleanup. Patch 3 originally submitted here [1], was merged to mainline but reverted for stackdepot related issues as explained in the patch. Patches 4-6 originally submitted as RFC here [2]. In this submission I have omitted the new file 'all_objects' (patch 3/3 in [2]) as it might be considered too intrusive so I will postpone it for later. The docs patch is adjusted accordingly. Also available in git, based on v5.17-rc1: https://git.kernel.org/pub/scm/linux/kernel/git/vbabka/linux.git/log/?h=slub-stackdepot-v2 I'd like to ask for some more review/testing before I add this to the slab tree. [1] https://lore.kernel.org/all/20210414163434.4376-1-glittao@gmail.com/ [2] https://lore.kernel.org/all/20210521121127.24653-1-glittao@gmail.com/ Oliver Glitta (4): mm/slub: use stackdepot to save stack trace in objects mm/slub: distinguish and print stack traces in debugfs files mm/slub: sort debugfs output by frequency of stack traces slab, documentation: add description of debugfs files for SLUB caches Vlastimil Babka (2): lib/stackdepot: allow requesting early initialization dynamically mm/slub: move struct track init out of set_track() Documentation/vm/slub.rst | 64 ++++++++++++++++++ include/linux/stackdepot.h | 16 ++++- init/Kconfig | 1 + lib/stackdepot.c | 2 + mm/page_owner.c | 9 ++- mm/slab_common.c | 5 ++ mm/slub.c | 135 +++++++++++++++++++++++++------------ 7 files changed, 183 insertions(+), 49 deletions(-)