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 B629CC47258 for ; Wed, 31 Jan 2024 22:40:26 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 387746B0081; Wed, 31 Jan 2024 17:40:26 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 337E96B0087; Wed, 31 Jan 2024 17:40:26 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 1D8A26B0089; Wed, 31 Jan 2024 17:40:26 -0500 (EST) 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 0C25A6B0081 for ; Wed, 31 Jan 2024 17:40:26 -0500 (EST) Received: from smtpin03.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay03.hostedemail.com (Postfix) with ESMTP id D4408A0700 for ; Wed, 31 Jan 2024 22:40:25 +0000 (UTC) X-FDA: 81741076410.03.9536033 Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.223.131]) by imf24.hostedemail.com (Postfix) with ESMTP id 3B43318000C for ; Wed, 31 Jan 2024 22:40:22 +0000 (UTC) Authentication-Results: imf24.hostedemail.com; dkim=pass header.d=suse.cz header.s=susede2_rsa header.b=i420XTnl; dkim=pass header.d=suse.cz header.s=susede2_ed25519 header.b=Y5QR2MaL; dkim=pass header.d=suse.cz header.s=susede2_rsa header.b=i420XTnl; dkim=pass header.d=suse.cz header.s=susede2_ed25519 header.b=Y5QR2MaL; dmarc=none; spf=pass (imf24.hostedemail.com: domain of vbabka@suse.cz designates 195.135.223.131 as permitted sender) smtp.mailfrom=vbabka@suse.cz ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1706740823; a=rsa-sha256; cv=none; b=UFPwhbkVO0PlcG5FYYHQyPxdCthwLv07IxV/rMAZGe77Z0MFH7uvES1Nf6J+6kJGUSNvI1 BHr91po0V3vtfIsna8ds9CBrH/+G9nwzlC1yWkElo42YkTb0v1s9QqxPn9mnMnbe2i9SzR 4C/nfnrU+ZKETDEIX3P/SMQHe2vP+Xc= ARC-Authentication-Results: i=1; imf24.hostedemail.com; dkim=pass header.d=suse.cz header.s=susede2_rsa header.b=i420XTnl; dkim=pass header.d=suse.cz header.s=susede2_ed25519 header.b=Y5QR2MaL; dkim=pass header.d=suse.cz header.s=susede2_rsa header.b=i420XTnl; dkim=pass header.d=suse.cz header.s=susede2_ed25519 header.b=Y5QR2MaL; dmarc=none; spf=pass (imf24.hostedemail.com: domain of vbabka@suse.cz designates 195.135.223.131 as permitted sender) smtp.mailfrom=vbabka@suse.cz ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1706740823; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=HU/MHt4bpSUIbf9vJbcMZdqGZh6pUP/ciy9veOcetGc=; b=AkZa9yRn3vEcrCq0KlJuNjBy2E79F3LNRK6oIyJfy09IJUtQ6XTZoepDspxQUH/wVzguCN nxlsmvaJsccCD5Qp6s4Ik59KAaIPk2SFbTaLbqXKohJ1ZLf1347Ctr7woxqhH6kBENjt4P YeXxcHr6UDdngUW9qhp20gKeCBYY4q0= Received: from imap1.dmz-prg2.suse.org (imap1.dmz-prg2.suse.org [IPv6:2a07:de40:b281:104:10:150:64:97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id AC70F1FBA1; Wed, 31 Jan 2024 22:40:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1706740820; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=HU/MHt4bpSUIbf9vJbcMZdqGZh6pUP/ciy9veOcetGc=; b=i420XTnlbuZtt9B5dAeuuepUIfLiZqfoxcD1o80ecfHN0NOUOlw6lgWYm8E7pcxZI/y4eb lZbc8hRLbRXu3kWj/Jvkk2yad24zAHxZC/tWatJzBNJVJlrbvs2wGQaDLyQDWex3qeIGze lEnhX2Ukckk9mZHz+TteccR/xu+crAI= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1706740820; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=HU/MHt4bpSUIbf9vJbcMZdqGZh6pUP/ciy9veOcetGc=; b=Y5QR2MaLRvDDuIh/v6EX/X4jnkFJQJlW6/E7/A/w6qgtZ3d0vBAqC7CYNgA5083PhYtXBE rWV2/OK9DZRizBAg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1706740820; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=HU/MHt4bpSUIbf9vJbcMZdqGZh6pUP/ciy9veOcetGc=; b=i420XTnlbuZtt9B5dAeuuepUIfLiZqfoxcD1o80ecfHN0NOUOlw6lgWYm8E7pcxZI/y4eb lZbc8hRLbRXu3kWj/Jvkk2yad24zAHxZC/tWatJzBNJVJlrbvs2wGQaDLyQDWex3qeIGze lEnhX2Ukckk9mZHz+TteccR/xu+crAI= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1706740820; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=HU/MHt4bpSUIbf9vJbcMZdqGZh6pUP/ciy9veOcetGc=; b=Y5QR2MaLRvDDuIh/v6EX/X4jnkFJQJlW6/E7/A/w6qgtZ3d0vBAqC7CYNgA5083PhYtXBE rWV2/OK9DZRizBAg== Received: from imap1.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id 7886E139B1; Wed, 31 Jan 2024 22:40:20 +0000 (UTC) Received: from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167]) by imap1.dmz-prg2.suse.org with ESMTPSA id /4zpHFTMumXLfAAAD6G6ig (envelope-from ); Wed, 31 Jan 2024 22:40:20 +0000 Message-ID: <61af19ca-5f9a-40da-a04d-b04ed27b8754@suse.cz> Date: Wed, 31 Jan 2024 23:40:20 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: Do we still need SLAB_MEM_SPREAD (and possibly others)? To: Yosry Ahmed , Steven Rostedt Cc: LKML , linux-mm@kvack.org, Andrew Morton , Linus Torvalds , Kees Cook , Christoph Lameter , David Rientjes , Hyeonggon Yoo <42.hyeyoo@gmail.com>, Xiongwei Song , Chengming Zhou , Zheng Yejian References: <20240131172027.10f64405@gandalf.local.home> Content-Language: en-US From: Vlastimil Babka In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spamd-Bar: / X-Rspam-User: X-Rspamd-Server: rspam06 X-Rspamd-Queue-Id: 3B43318000C X-Stat-Signature: shq73qd6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l4o7uUpbCr0dQ+63qtBt70pc4pLZNSISdVcoWZQ35DyeCSNGI8Nv8ayyG8Hi4TS2/SvnXsygR4vQYtSyCvGDD6tiZk8Qv9hFTW2Dkfi2LdA4ApVrd70k3UL5Fsyr+RP7fZFISjuHUnVkp7HdLDju0kdm3VDZQFpUhO87xrt1oQoEGgpDC2droASLKKoJwJiPgmSIib4cnatWyIy/kKKq7yIdFCdIe1cz+wncayPBfIFR+FRAvbDfq/eUI5SOre28SmF0bgAz45ITuh799hdvwpUs8ZTtHPNTi1wlUej60e/oxP9M9uLpRV9TMajmcwrG0l6C4NnPw3ktynq+YpCQSWzt42B9jZzfkqexdfZchKU4OqOi6hwsoxm0t8tROyXTSY7CGMvR1+vjEQrAs1l02kefL6SuQqewGla2ZhgHX2Q+Ahl9wT6bB33z4pHNt8Huo2WxAa/UtfBsYHDe7nxSI4pjHcOms+5f/8DGAM03CC1EBRlBCEu0W2D+5nJMC7Mz0= 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: List-Subscribe: List-Unsubscribe: On 1/31/24 23:25, Yosry Ahmed wrote: > On Wed, Jan 31, 2024 at 2:20 PM Steven Rostedt wrote: >> >> I was looking into moving eventfs_inode into a slab, and after cutting and >> pasting the tracefs allocator: >> >> tracefs_inode_cachep = kmem_cache_create("tracefs_inode_cache", >> sizeof(struct tracefs_inode), >> 0, (SLAB_RECLAIM_ACCOUNT| >> SLAB_MEM_SPREAD| >> SLAB_ACCOUNT), >> init_once); >> >> I figured I should know what those slab flags mean. I also looked at what >> others in fs use for their slabs. The above is rather common (which I >> probably just copied from another file system), but I wanted to know what >> they are for. >> >> When I got to SLAB_MEM_SPREAD, I found that it's a common flag and there's >> a lot of caches that just set that and nothing else. >> >> But I couldn't find how it was used. >> >> Then I found this commit: >> >> 16a1d968358a ("mm/slab: remove mm/slab.c and slab_def.h") >> >> Which I think removed the only use case of SLAB_MEM_SPREAD. >> >> $ git grep SLAB_MEM_SPREAD mm >> mm/slab.h: SLAB_MEM_SPREAD | \ >> >> That's all I find in the mm directory. >> >> Is it obsolete now? Can we delete it? Maybe there's other SLAB_* flags that >> are no longer used. I don't know, I haven't audited them. > > Perhaps cpuset_do_slab_mem_spread() as well. Yep, good find. Show how obscure mm/slab.c was in the end :) CCing a few more new people who did slab changes recently, who'd like some low hanging fruit of negative diffcount? :) Thanks, Vlastimil