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 X-Spam-Level: X-Spam-Status: No, score=-1.1 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4747DC2BA2B for ; Thu, 16 Apr 2020 06:02:15 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 0199A214AF for ; Thu, 16 Apr 2020 06:02:14 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=kernel.org header.i=@kernel.org header.b="oAet7vuP" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 0199A214AF Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 8795E8E0085; Thu, 16 Apr 2020 02:02:14 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 82A578E0001; Thu, 16 Apr 2020 02:02:14 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 73FEA8E0085; Thu, 16 Apr 2020 02:02:14 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0208.hostedemail.com [216.40.44.208]) by kanga.kvack.org (Postfix) with ESMTP id 5914A8E0001 for ; Thu, 16 Apr 2020 02:02:14 -0400 (EDT) Received: from smtpin06.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id 24507180AD815 for ; Thu, 16 Apr 2020 06:02:14 +0000 (UTC) X-FDA: 76712672988.06.bag46_87e213bab642d X-HE-Tag: bag46_87e213bab642d X-Filterd-Recvd-Size: 3794 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by imf11.hostedemail.com (Postfix) with ESMTP for ; Thu, 16 Apr 2020 06:02:13 +0000 (UTC) Received: from devnote2 (NE2965lan1.rev.em-net.ne.jp [210.141.244.193]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 94EEA2076A; Thu, 16 Apr 2020 06:02:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1587016932; bh=H95Q/syDnIOT80mK9pLWTpk+EblpARC2OaGNoxyxAiw=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=oAet7vuPUBRUElKdTjJcmSJ6ELXSNTpWsbnm60yn9+4UnifDG+l8n2NPbSf5FPtZ9 1U6C6/MVqik5+/djGWSe2Gf8hwEr3OSdXNxzP4vdiAMdlgq8bCnXuMOQOsVn9YKbXY JgtPw4hu85/iVYpCPrhhtkGX5tA//9IcGEWs4BTw= Date: Thu, 16 Apr 2020 15:02:06 +0900 From: Masami Hiramatsu To: Luis Chamberlain Cc: Vlastimil Babka , Andrew Morton , Kees Cook , Iurii Zaikin , linux-kernel@vger.kernel.org, linux-api@vger.kernel.org, linux-mm@kvack.org, Ivan Teterevkov , Michal Hocko , David Rientjes , Matthew Wilcox , "Eric W . Biederman" , "Guilherme G . Piccoli" , Alexey Dobriyan , Thomas Gleixner , Greg Kroah-Hartman , Christian Brauner Subject: Re: [PATCH v2 0/3] support setting sysctl parameters from kernel command line Message-Id: <20200416150206.d3e103a1a5497b3518d4359c@kernel.org> In-Reply-To: <20200415063041.GT11244@42.do-not-panic.com> References: <20200414113222.16959-1-vbabka@suse.cz> <20200415122359.939364e2c54c389c6b3f6457@kernel.org> <20200415063041.GT11244@42.do-not-panic.com> X-Mailer: Sylpheed 3.5.1 (GTK+ 2.24.32; x86_64-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit 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: Hi Luis, On Wed, 15 Apr 2020 06:30:41 +0000 Luis Chamberlain wrote: > Currently the maximum config size size is 32KB and the total key-words > (not key-value entries) must be under 1024 nodes. Note: this is not > the number of entries but nodes, an entry must consume more than 2 nodes > (a key-word and a value). So theoretically, it will be up to 512 > key-value pairs. If keys contains 3 words in average, it can contain 256 > key-value pairs. In most cases, the number of config items will be under > 100 entries and smaller than 8KB, so it would be enough. If the node > number exceeds 1024, parser returns an error even if the file size > is smaller than 32KB. Anyway, since bootconfig command verifies it when > appending a boot config to initrd image, user can notice it before > boot. > ``` > *recommending* bootconfig due to the limitation of cmdline seems > sensible, however if we advise that.. wouldn't the space for 512 > theoretical entries full up rather fast? Yeah, I think it is easier to hit the node number limitation rather than fill up the space. However, since the bootconfig supports comments, if user writes enough readable config file, I think it's probably the right balance :) If you think the 512 entries is too small, it is easy to expand it upto 32K (64K nodes). But it may consume 512KB memory only for the node (meta) data. Current 1024 nodes consumes 8KB (8bytes/node), so compared with the max data size (32KB), I think it is a better balance. Thank you, -- Masami Hiramatsu