Received: by 2002:a05:6a10:9afc:0:0:0:0 with SMTP id t28csp1674255pxm; Thu, 24 Feb 2022 07:24:15 -0800 (PST) X-Google-Smtp-Source: ABdhPJz9dtXYOiqzro4WIj94z3i8feRY6h3cpuMDmad230lpGt/I+rK52gtFJUi/QqwfNVMGiHok X-Received: by 2002:a05:6402:1cc1:b0:413:2cfb:b6ca with SMTP id ds1-20020a0564021cc100b004132cfbb6camr2788002edb.265.1645716255092; Thu, 24 Feb 2022 07:24:15 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1645716255; cv=none; d=google.com; s=arc-20160816; b=Av1agRzBBS8UB7BOX0jcArI78jIaFMNdK1dZcooyb8tQcjPLGAHI3V196jzTJ+Be/B VuKducyNW7iCwd2gYlZEFUaJ5f2EFazt7TsxVKxAZPr+lBHh0nc5TDsfaRKyMT/kflfg yt49XExaXftrDqllp0OHi5o00nHxoYHCa27fNefrWLnxUtQRT99AcqlIykvf5rwwqRDQ 2UIbGzkZ0X3aSHz7dM1BCefWXiVyRQWMRSwVhLhzSzgNBbCUc5SeUp2Vatji4++f5YTP bGOYldLCz/DS743WEDlP7vCECOJU1lgafSkvIS3EOnUWm8n38s+81FgPpEh+Z/7TQ0tu PpeQ== 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=/hEOHSk6mpdWOQGBOjCX5MvKKazQNk0J6qqzBVupACc=; b=FkS8EOuDSmnC85PVHUPQgpxnnY8TWmz7e2B7+Dq50oFaFFVfRJs9LolD0+md7KX4kV f+168zf1no+QQy7OaDpK/L2CFBz9Tk9dYDX+YmNX4/9V6IaRjFz745gnGfnuj62X2irP jRnzCNzqXtlPyJWduROmJu5/lCHy3kLDK3s+sGxCCGWXmvE0oUtmeby4sLgBSKnVUbFq LT10rJpJJVZWSV5Sq8LO8tR0ObVJrLbKOFGxYpPkCQ4RLT8ale5SurdkjXVwISSL2OoS 9tKeSqeqhnxngIshv1WHcTU06D0s/borOuS2zhGssId9ixJhnyLqyNdurdrFw6c+tfeX EZng== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.cz header.s=susede2_rsa header.b=kd9qcHfB; 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 nb36si1942606ejc.90.2022.02.24.07.23.48; Thu, 24 Feb 2022 07:24:15 -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=kd9qcHfB; 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 S234567AbiBXMwd (ORCPT + 99 others); Thu, 24 Feb 2022 07:52:33 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49262 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232338AbiBXMwb (ORCPT ); Thu, 24 Feb 2022 07:52:31 -0500 Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B47FA20C192 for ; Thu, 24 Feb 2022 04:52:01 -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-out2.suse.de (Postfix) with ESMTPS id 6ADD01F44A; Thu, 24 Feb 2022 12:52:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1645707120; 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=/hEOHSk6mpdWOQGBOjCX5MvKKazQNk0J6qqzBVupACc=; b=kd9qcHfB0uMRnvQRtQlnE/2aEw8n/2DqkEVkk4NCDppua4OsOt9r39jkr1e37OcLY7oi9x 8b6IJtKOCCx3+/MtXErSwIKnUYmLN4Iq0WzCphMhnF2I345uBcNsUSY4hmugGlLeO9KHG+ +QS7rib+SQSEWj9RVOGVLj2Yt2JzFZw= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1645707120; 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=/hEOHSk6mpdWOQGBOjCX5MvKKazQNk0J6qqzBVupACc=; b=R/upWeR00uc1VkH7l85083qEPjAX6RcNX226l+2+LFBkeQhHyGwoncgYIQ6JYh4rAF9iuV JVX5a87C5Qv087Ag== 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 4946D13AD9; Thu, 24 Feb 2022 12:52:00 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id hF8dEXB/F2LJEAAAMHmgww (envelope-from ); Thu, 24 Feb 2022 12:52:00 +0000 Message-ID: <2a7e0f81-8152-4e6b-6036-43c236da5013@suse.cz> Date: Thu, 24 Feb 2022 13:52:00 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.6.1 Subject: Re: [PATCH 4/5] mm/slub: Limit min_partial only in cache creation Content-Language: en-US To: Hyeonggon Yoo <42.hyeyoo@gmail.com>, David Rientjes Cc: linux-mm@kvack.org, Roman Gushchin , Andrew Morton , linux-kernel@vger.kernel.org, Joonsoo Kim , Christoph Lameter , Pekka Enberg References: <20220221105336.522086-1-42.hyeyoo@gmail.com> <20220221105336.522086-5-42.hyeyoo@gmail.com> <91cc8ab-a0f0-2687-df99-10b2267c7a9@google.com> From: Vlastimil Babka In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-4.4 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 2/23/22 04:37, Hyeonggon Yoo wrote: > On Tue, Feb 22, 2022 at 03:48:16PM -0800, David Rientjes wrote: >> On Mon, 21 Feb 2022, Hyeonggon Yoo wrote: >> >> > SLUB sets number of minimum partial slabs for node (min_partial) using >> > set_min_partial(). SLUB holds at least min_partial slabs even if they're empty >> > to avoid excessive use of page allocator. >> > >> > set_min_partial() limits value of min_partial between MIN_PARTIAL and >> > MAX_PARTIAL. As set_min_partial() can be called by min_partial_store() >> > too, Only limit value of min_partial in kmem_cache_open() so that it >> > can be changed to value that a user wants. >> > >> > Signed-off-by: Hyeonggon Yoo <42.hyeyoo@gmail.com> >> >> I think this makes sense and there is no reason to limit the bounds that >> may be set at runtime with undocumented behavior. Right. > Thank you for comment. > >> >> However, since set_min_partial() is only setting the value in the >> kmem_cache, could we remove the helper function entirely and fold it into >> its two callers? > > Right. We don't need to separate this as function. I'll update this > in next version. Thanks! Agreed, thanks!