Received: by 2002:a05:6602:18e:0:0:0:0 with SMTP id m14csp264775ioo; Thu, 26 May 2022 03:12:12 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw49Plad0/h6Gvgc6cbBTcbDSZZLG4FNca3kk8pM1WUfWw6Lbj9FoWIuja5PW56RutWO+dQ X-Received: by 2002:a17:907:1b14:b0:6ef:a5c8:afbd with SMTP id mp20-20020a1709071b1400b006efa5c8afbdmr33795572ejc.151.1653559931975; Thu, 26 May 2022 03:12:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1653559931; cv=none; d=google.com; s=arc-20160816; b=QAFDO/BQVJFoVj4g2mLZv/DSQZU73/5rnanUmLvSDQaDD/N9F9bXADIzW74Gv+w49r nkB+8tw7/ncSR/u6auOnzSi2eV4r2iQZB3cC4GSdDtsIfyQ7OZlXzKolZf5F7x6zjY4K T6FkFao77zscDiH55pNudQY22x0HQ7ZZcJAYE4TFzGfP4ecEBLC5OtNe9zu7qGohNSQp O5eQPIDQ/+P34+kyNSo00HMTXqe7TCb/6geLXFmsFNGyNNydRFf1nEut2VahyYzvGm63 VDaYGk9s926RzPZqNXt6Q6p/vewf6KhrRV3HafDrikzZACszAdpuTmvEATyY+8VhxaJE IbUA== 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:dkim-signature; bh=MZTWk+nqmtrWxTo6wTFkZfE7MJ+b6KvQ4q/PEBxVNNQ=; b=eAeMpkGHeHSweIvEesbabM/lSm4e5/nTmfYfnuP6rLvVao5G6mU+nWhDWEMA7lpi37 IaTlujP85b9GpvL5J5RPhdhl+o2pDLW+mKS6BBDfewQRhMQqkw9ETPgRaQZhX5VTd8i2 26WkFQ0Rh8fWwnajO4t4gv5VEVD1xtmVAsAB/cnEWnL8/kpQahONfTPlcKyRH/4zDOsW DRqFUZan6GCeLrdQZLFqkecryG//jzanOmSa06MS70Bedavnym/WMvAfeL40r21VdaeV bWlcVHEGjSUQxEmGulR2ajJ7FmM4PgYiK7N6TppAG353mzXvU9L3VCeVQS8VznLJtHLB X5pg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.cz header.s=susede2_rsa header.b=0rlM6xcz; dkim=neutral (no key) header.i=@suse.cz header.s=susede2_ed25519; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id nb42-20020a1709071caa00b006f4d3fac3e8si1178237ejc.292.2022.05.26.03.11.43; Thu, 26 May 2022 03:12:11 -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=@suse.cz header.s=susede2_rsa header.b=0rlM6xcz; dkim=neutral (no key) header.i=@suse.cz header.s=susede2_ed25519; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240895AbiEYWB2 (ORCPT + 99 others); Wed, 25 May 2022 18:01:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43648 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230147AbiEYWBZ (ORCPT ); Wed, 25 May 2022 18:01:25 -0400 Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9903536308 for ; Wed, 25 May 2022 15:01:23 -0700 (PDT) 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 2CD421F8DC; Wed, 25 May 2022 22:01:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1653516082; 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=MZTWk+nqmtrWxTo6wTFkZfE7MJ+b6KvQ4q/PEBxVNNQ=; b=0rlM6xczS7xOBWrIBlX+Hpmv+IYMDxBsc1k3bAOno5Bs6zpfJtQj193O/I9swzVYvCXD9J l2f0vcX7M4drEFLwwsP+xP/BA5oDrN/GEbH9wNyM3f9b68GLeAVuMu/6QMNqs5kDxx2lOW N5ln3pZQCZCjQV8QqGVds2muh1UM0xs= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1653516082; 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=MZTWk+nqmtrWxTo6wTFkZfE7MJ+b6KvQ4q/PEBxVNNQ=; b=DYTNjD+zIxxy5r97/tgP3d9zFmuEf44ixt/GlRvpycsenmLEE8VXhxDUWyJ1bHvVkuUEEL AvxCW2r/IaithyCA== 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 E1F4313ADF; Wed, 25 May 2022 22:01:21 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id 0HkhNjGnjmITHwAAMHmgww (envelope-from ); Wed, 25 May 2022 22:01:21 +0000 Message-ID: Date: Thu, 26 May 2022 00:00:06 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.9.0 Subject: Re: [GIT PULL] slab for 5.19 Content-Language: en-US To: Linus Torvalds Cc: David Rientjes , Joonsoo Kim , Christoph Lameter , Pekka Enberg , Andrew Morton , "linux-mm@kvack.org" , LKML , patches@lists.linux.dev, Roman Gushchin , Hyeonggon Yoo <42.hyeyoo@gmail.com>, Geert Uytterhoeven , Alexander Potapenko References: <8062f61e-5a4d-00a5-be1a-7921d3277e9d@suse.cz> <6cdbe746-2c6f-f698-11d4-9f86d2c4e5cc@suse.cz> From: Vlastimil Babka In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-4.5 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,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 5/25/22 23:36, Linus Torvalds wrote: > Because it used to be that stack depot users were fairly easy to > figure out. It was all about pretty special debug options that enable > a lot of very special code (KASAN and PAGE_OWNER - is there anything > else?). Some parts of DRM debugging and looks like also recently networking through ref_tracker, which also seems to be debugging. > Very clearly just debug builds. > > But this slab change means that now it's basically *always* enabled as > an option, and that means that now it had better do sane things > because it's enabled by default and not something that can easily be > ignored any more. > > The kernel config phase is something I'm very sensitive to, because > honestly, it's just about the worst part of building a kernel. > Everything else is pretty easy. The kernel config is painful. > > That means that we should not ask insane questions - and asking what > static size you want for a data structure that 99% of all people have > absolutely _zero_ idea about or interest in is wrong. Understood. > So the problem here is two-fold: > > (a) it introduces a new compile-time question that isn't sane to ask > a regular user, but is now exposed to regular users. > > (b) this by default uses 1MB of memory for a feature that didn't in > the past, so now if you have small machines you need to make sure you > make a special kernel config for them. > > And (a) happens unconditionally, while (b) is conditional. And it's > now clear exactly what all triggers the actual allocation in (b). > > I _hope_ it's never triggered unless you actively enable slub debug, > but at least from a quick grep it wasn't obvious. > > For example, if you happen to have rcutorture enabled, do you get the > allocation then just because rcutorture uses > > kcp = kmem_cache_create("rcuscale", 136, 8, SLAB_STORE_USER, NULL); > > even if you have nothing else that would enable slaub debugging? It > *looked* that way to me from a quick grep, but I could easily have > missed something. Yes, running rcutorture will trigger that stackdepot allocation, but as that's in RCU debugging part of config, I considered it in the same category as enabling slub debugging. But yeah I realize it might become a problem if someone wants to run rcutorture on m68k :/ > Linus