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=-2.5 required=3.0 tests=MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 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 E6B89C2BA2B for ; Thu, 16 Apr 2020 06:38:38 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id B342020787 for ; Thu, 16 Apr 2020 06:38:38 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B342020787 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 32E9D8E0091; Thu, 16 Apr 2020 02:38:38 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 2DFA28E0001; Thu, 16 Apr 2020 02:38:38 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 1CE068E0091; Thu, 16 Apr 2020 02:38:38 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0186.hostedemail.com [216.40.44.186]) by kanga.kvack.org (Postfix) with ESMTP id 03ED18E0001 for ; Thu, 16 Apr 2020 02:38:37 -0400 (EDT) Received: from smtpin04.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id B7BB4180AD81A for ; Thu, 16 Apr 2020 06:38:37 +0000 (UTC) X-FDA: 76712764674.04.ducks42_1117c56e26f2b X-HE-Tag: ducks42_1117c56e26f2b X-Filterd-Recvd-Size: 5166 Received: from mail-pl1-f193.google.com (mail-pl1-f193.google.com [209.85.214.193]) by imf01.hostedemail.com (Postfix) with ESMTP for ; Thu, 16 Apr 2020 06:38:37 +0000 (UTC) Received: by mail-pl1-f193.google.com with SMTP id n24so992418plp.13 for ; Wed, 15 Apr 2020 23:38:37 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=JhqXMpaDtR4QdQFxjiccypTqasAwt8uY42ZQFRo6zec=; b=jj1YkbpZdcEUTap95kpVvpWE3B3D31lxssi1KdduqUfJAKaTW2gkFgZIF/n3xdrz2N IOKEoQhQ1J+MCmK/eAyYV2SIEf4a4tM0wX0PaU/5wDEOfIx48QX2/npMExXSLw+n5i9k yfXLIKBAp63GVsI/TvvbAHMiLZOvzoUH8b/05euowFY9mCKjg2YRmNvR/LRM64HW1Lhz ouUzZ1ipd6ctFj02q9VSAmIpVP/00gEX9DMZjajXn2En1pwH/CBQh/Ml4mbdFSCT0ded 0SYJFyF9wbJEqz++YW1ziUqdEPqJvoHDfE8QfHEGUoR1AEdjoY7padCCTSa0LAshhLSS 8tEA== X-Gm-Message-State: AGi0PuY4pnPyS031P4rLs+AFWUoZKcLFH6rBN0uqrqJ26onQNW2idVYf Ds4cePXRzC5Jkdv4uW4PxCg= X-Google-Smtp-Source: APiQypLiX3EEejSxMY4gob9qPf7SrIgOr5sEycuMHTgXEAp2MDuLtUM6+B/3dTfOGpjnAYR05+tkBA== X-Received: by 2002:a17:902:107:: with SMTP id 7mr8248874plb.302.1587019116498; Wed, 15 Apr 2020 23:38:36 -0700 (PDT) Received: from 42.do-not-panic.com (42.do-not-panic.com. [157.230.128.187]) by smtp.gmail.com with ESMTPSA id p8sm1549014pjd.10.2020.04.15.23.38.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 15 Apr 2020 23:38:35 -0700 (PDT) Received: by 42.do-not-panic.com (Postfix, from userid 1000) id 7570B40277; Thu, 16 Apr 2020 06:38:34 +0000 (UTC) Date: Thu, 16 Apr 2020 06:38:34 +0000 From: Luis Chamberlain To: Masami Hiramatsu 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: <20200416063834.GO11244@42.do-not-panic.com> References: <20200414113222.16959-1-vbabka@suse.cz> <20200415122359.939364e2c54c389c6b3f6457@kernel.org> <20200415063041.GT11244@42.do-not-panic.com> <20200416150206.d3e103a1a5497b3518d4359c@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200416150206.d3e103a1a5497b3518d4359c@kernel.org> User-Agent: Mutt/1.10.1 (2018-07-13) 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 Thu, Apr 16, 2020 at 03:02:06PM +0900, Masami Hiramatsu wrote: > 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. Yeah, and well at least x86 / x86_64 sets COMMAND_LINE_SIZE to 2048 right now (2 KB), that'd hit the limit of abuse of cmdline pretty fast too. I see no way to scale this reasonably if people abuse syctls on the command line but to use bootconfig and bite the bullet on size, to keep sanity. Luis