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 5676AC433EF for ; Thu, 24 Feb 2022 12:52:03 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id DE4C98D0002; Thu, 24 Feb 2022 07:52:02 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id D6D5F8D0001; Thu, 24 Feb 2022 07:52:02 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id C0E768D0002; Thu, 24 Feb 2022 07:52:02 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0003.hostedemail.com [216.40.44.3]) by kanga.kvack.org (Postfix) with ESMTP id B2FB18D0001 for ; Thu, 24 Feb 2022 07:52:02 -0500 (EST) Received: from smtpin20.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id 615FB181D8618 for ; Thu, 24 Feb 2022 12:52:02 +0000 (UTC) X-FDA: 79177660884.20.05E2956 Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) by imf28.hostedemail.com (Postfix) with ESMTP id 8FDEEC000D for ; Thu, 24 Feb 2022 12:52:01 +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 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-Rspamd-Server: rspam01 X-Rspamd-Queue-Id: 8FDEEC000D X-Rspam-User: Authentication-Results: imf28.hostedemail.com; dkim=pass header.d=suse.cz header.s=susede2_rsa header.b=kd9qcHfB; dkim=pass header.d=suse.cz header.s=susede2_ed25519 header.b="R/upWeR0"; spf=pass (imf28.hostedemail.com: domain of vbabka@suse.cz designates 195.135.220.29 as permitted sender) smtp.mailfrom=vbabka@suse.cz; dmarc=none X-Stat-Signature: gcxekcsiystfo4km56zni984jnngaazj X-HE-Tag: 1645707121-93913 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: 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!