Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp8582740rwb; Thu, 24 Nov 2022 01:17:16 -0800 (PST) X-Google-Smtp-Source: AA0mqf41mqqXZb9RkMbGdE9d7C6c8OiFcxbbJVNUTNiDzBP5RK8SNGIPdm9pgsWsc8+xSEL4ektR X-Received: by 2002:aa7:c85a:0:b0:45f:b9d8:9514 with SMTP id g26-20020aa7c85a000000b0045fb9d89514mr29695938edt.204.1669281436223; Thu, 24 Nov 2022 01:17:16 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669281436; cv=none; d=google.com; s=arc-20160816; b=LT+NrF8snqi4tJm/n5+wM1ebeb++gHiIguSCfJMejRlnbSfUVXAtpW7X7ZANHKReHP Ey1SgGf22khkORmup+GPI5xW957LGaIgdWYnybh/qdYq8rp3Unzd7wh1siDXSRUZW1iZ sg81J1gBu6xa+6sdpoTWeX39LXtWDo4atYzhZWaNqYM81OUh5fDuOMEA+Vs54Fd//U1H b+j8qljF1QwEbzZB+Lj30YcbAy+VchQh/YA4FQv7fExBVvY3mu2e3LUWukkXOyxhbVaT GqtyH4O8dxbp4JEgWWIr/IG+HVVj0fHXy8A7E/4RGKS5l+JyrVvx8N8LUV0EJP50X7Mp NdJQ== 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=FclYwF7mD6zlQIZIpdVB8v8DFuE768K+j4RqjDVV1Z4=; b=sKzRZ715sdKeSgugsGX4jj60mDEspjhndX1iug+zMtDenhfsv3czrZ3l5mLwchqIwx uDpxDBawnXRApxBiadGKK2ANMwIY8i4t1J/V6uTyJoHkGbUvp9rf3rRUSPv2AVjIKnkt vw6EnNxBLmBTnfBxAQN5kvya9J9U0UcCzvelE4MG/DAf4E0aCDtTiRZpa0E8WHsU4w4I nB27o36Q908aLPXF9ocbVhNNATJ2XMSvnUDKgZTjDnvOedlxNgitoyYfxPoyhNc6I4Tc +m8XolPxqov0PFYIDqSt73Y/17h7xSXy/7xUY3HC/sSWhLsWKHz7Eql+ZGweYLKtfoe+ RoAg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.cz header.s=susede2_rsa header.b=kEOX+wB6; dkim=neutral (no key) header.i=@suse.cz header.s=susede2_ed25519 header.b=NEHVony4; 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 t10-20020aa7d4ca000000b00461891a8138si484602edr.446.2022.11.24.01.16.53; Thu, 24 Nov 2022 01:17:16 -0800 (PST) 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=kEOX+wB6; dkim=neutral (no key) header.i=@suse.cz header.s=susede2_ed25519 header.b=NEHVony4; 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 S229798AbiKXJJI (ORCPT + 87 others); Thu, 24 Nov 2022 04:09:08 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45142 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229821AbiKXJJH (ORCPT ); Thu, 24 Nov 2022 04:09:07 -0500 Received: from smtp-out1.suse.de (smtp-out1.suse.de [IPv6:2001:67c:2178:6::1c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 15D0E9734F for ; Thu, 24 Nov 2022 01:09:06 -0800 (PST) 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-out1.suse.de (Postfix) with ESMTPS id 364C1218E6; Thu, 24 Nov 2022 09:09:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1669280944; 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=FclYwF7mD6zlQIZIpdVB8v8DFuE768K+j4RqjDVV1Z4=; b=kEOX+wB6OF6hz8EP3HGfyVC4B/lC6PiVIhtAYVxDG4OMYQ4ztcDfl4ilXlWVDbdIEeiMUO WMDEfdioXUZ+E7lo0orv9i4D6w3ETgDA74t9Y4MSNX2bOvT+7rWMDLvYaOFm/8AOzEUz7K n/qkOdjBW4q036Y+T1XmEJ66cw8X8To= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1669280944; 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=FclYwF7mD6zlQIZIpdVB8v8DFuE768K+j4RqjDVV1Z4=; b=NEHVony4RogAIHQYKpjGONKexPxGDMrMJ5UiEjLrzU53yMnOA63UrZssDjr7V+PnhxQDgS EwEwBwNGxVYVMfDA== 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 0EE9013B4F; Thu, 24 Nov 2022 09:09:04 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id MQIBA7A0f2NyFwAAMHmgww (envelope-from ); Thu, 24 Nov 2022 09:09:04 +0000 Message-ID: <23028c8a-7e53-6993-e076-6df8a6939313@suse.cz> Date: Thu, 24 Nov 2022 10:09:03 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.5.0 Subject: Re: [PATCH 07/12] mm, slab: ignore SLAB_RECLAIM_ACCOUNT with CONFIG_SLUB_TINY Content-Language: en-US To: Roman Gushchin Cc: Christoph Lameter , David Rientjes , Joonsoo Kim , Pekka Enberg , Hyeonggon Yoo <42.hyeyoo@gmail.com>, Andrew Morton , Linus Torvalds , Matthew Wilcox , patches@lists.linux.dev, linux-mm@kvack.org, linux-kernel@vger.kernel.org References: <20221121171202.22080-1-vbabka@suse.cz> <20221121171202.22080-8-vbabka@suse.cz> From: Vlastimil Babka In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-3.7 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_SOFTFAIL 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 11/24/22 02:20, Roman Gushchin wrote: > On Mon, Nov 21, 2022 at 06:11:57PM +0100, Vlastimil Babka wrote: >> SLAB_RECLAIM_ACCOUNT caches allocate their slab pages with >> __GFP_RECLAIMABLE and can help against fragmentation by grouping pages >> by mobility, but on tiny systems mobility grouping is likely disabled >> anyway and ignoring SLAB_RECLAIM_ACCOUNT might instead lead to merging >> of caches that are made incompatible just by the flag. >> >> Thus with CONFIG_SLUB_TINY, make SLAB_RECLAIM_ACCOUNT ineffective. > > Hm, do you see disabling all kernel memory accounting functionality > with COFNIG_SLUB_TINY? I'd say yes. But in this case need to be consistent > and disable it alltogether. SLAB_RECLAIM_ACCOUNT is kinda misnomer these days, as the only thing it does is to add __GFP_RECLAIMABLE to cache's gfp flags for the page allocator's mobility grouping. I guess the "ACCOUNT" part comes from being counted towards SReclaimable (vs SUnreclaim) in /proc/meminfo. So currently SLUB_TINY has no effect on MEMCG_KMEM (which you probably meant). Using those two together has little sense and had I stumbled while making this series upon a code that would become complicated, I would have made SLUB_TINY disable MEMCG_KMEM, but that didn't happen so I left as is for now. > Thanks!