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 1F97EC2BA2B for ; Wed, 15 Apr 2020 06:30:46 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id DF9D4206F9 for ; Wed, 15 Apr 2020 06:30:45 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org DF9D4206F9 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 6F7A18E0005; Wed, 15 Apr 2020 02:30:45 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 6A7EF8E0001; Wed, 15 Apr 2020 02:30:45 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 56FAD8E0005; Wed, 15 Apr 2020 02:30:45 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0252.hostedemail.com [216.40.44.252]) by kanga.kvack.org (Postfix) with ESMTP id 3F2038E0001 for ; Wed, 15 Apr 2020 02:30:45 -0400 (EDT) Received: from smtpin19.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id 022BD4DD8 for ; Wed, 15 Apr 2020 06:30:45 +0000 (UTC) X-FDA: 76709116050.19.table46_239e5b0ef832d X-HE-Tag: table46_239e5b0ef832d X-Filterd-Recvd-Size: 5168 Received: from mail-pl1-f193.google.com (mail-pl1-f193.google.com [209.85.214.193]) by imf44.hostedemail.com (Postfix) with ESMTP for ; Wed, 15 Apr 2020 06:30:44 +0000 (UTC) Received: by mail-pl1-f193.google.com with SMTP id w3so890730plz.5 for ; Tue, 14 Apr 2020 23:30:44 -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=4LxcdXE4D1IxsThm3AhK7U6oJIApRsieXToTt1nK21A=; b=p3mqF/iZPaJDpeuDNYToJQjH/QTwgui5MtBsicV+THaP2TSk2IexyvSDVxdKQRyBqj WEWzZil+8E8hsMTFeH++2jEr64NyhNQLqY5pwfXqdeYSxUo2GlZG5fCjSGBKaXE+dbkB W8VdJRk7ucCmJMBP4/nKnmsgRRpZ/H2DToZseL407cn+7e5PYQCRUcAcbC9P2OT7uhdE /jkvNFKpw0ih7aYUB4ObnU3P78cl6uot+7jFw5jbjN6xNqCXDyh3s3a7+TKh3YqLQQ9O EFPhCwEKlwpmb+S5NDk1k6lPdtals+rGQlYiQGUyy0kzu/nPRr/GCk4LFTPyh9DXTqSs teSg== X-Gm-Message-State: AGi0PuY4E+nB7EHEmFOBTvunUhxhVa4zIZ44Y0FGvJEn01/89P6xJeer sYMS3lK//OIx0FeWe+622Lg= X-Google-Smtp-Source: APiQypJFLgQFEvz8AfxQfJ1OPsrl6W7Iz6lebKgSICb68UwY5Tr8ekRd4l9VhDpF57YV7QrUZX+Vnw== X-Received: by 2002:a17:90a:d101:: with SMTP id l1mr4382396pju.79.1586932243703; Tue, 14 Apr 2020 23:30:43 -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 d188sm12635163pfa.7.2020.04.14.23.30.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 14 Apr 2020 23:30:42 -0700 (PDT) Received: by 42.do-not-panic.com (Postfix, from userid 1000) id CFE4340277; Wed, 15 Apr 2020 06:30:41 +0000 (UTC) Date: Wed, 15 Apr 2020 06:30:41 +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: <20200415063041.GT11244@42.do-not-panic.com> References: <20200414113222.16959-1-vbabka@suse.cz> <20200415122359.939364e2c54c389c6b3f6457@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200415122359.939364e2c54c389c6b3f6457@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 Wed, Apr 15, 2020 at 12:23:59PM +0900, Masami Hiramatsu wrote: > Hi Vlastimil, > > On Tue, 14 Apr 2020 13:32:19 +0200 > Vlastimil Babka wrote: > > > This series adds support for something that seems like many people always > > wanted but nobody added it yet, so here's the ability to set sysctl parameters > > via kernel command line options in the form of sysctl.vm.something=1 > > Sounds good. And would you consider to use the bootconfig instead of (or > in addition to) the kernel command line, because it is too short to describe > the sysctl options? FWIW for the lazy: The cmdline limitation: Documentation/admin-guide/kernel-parameters.rst ``` The number of kernel parameters is not limited, but the length of the complete command line (parameters including spaces etc.) is limited to a fixed number of characters. This limit depends on the architecture and is between 256 and 4096 characters. It is defined in the file ./include/asm/setup.h as COMMAND_LINE_SIZE. ``` The bootconfig limitation: Documentation/admin-guide/bootconfig.rst ``` 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? Luis