Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp614095ybz; Wed, 15 Apr 2020 15:10:13 -0700 (PDT) X-Google-Smtp-Source: APiQypK5flvdKpDT2TWyx7opnEgJSH+EnHcvbA0xLFOKSeRjz2TavvFOuNc7Bxle7vixI/zK0GtD X-Received: by 2002:aa7:c64a:: with SMTP id z10mr27454913edr.126.1586988612891; Wed, 15 Apr 2020 15:10:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1586988612; cv=none; d=google.com; s=arc-20160816; b=odoyqgZFrF+eRrWpMR/BME0EdfqHMqYctzw1c2bGMLl86sEdMH8lSONsA3M3eWb+oK 3Knq99yw2cIlOe2zTB0GUctpFg8VNsBRMRd6hEYa9Y9JgLtyUxWJDUoeJg6W/CXRYDYe 8ePP+77QmyuV6hJpi1cqob5qgoD4eUCb1TZt9htehrxCk3mzryxwEiYRRk8z1FUGIrjR msLKx1+xkui1bs1jDgoLxCsFI7Ygu6PeSBmGzVrosH+PE9gXhpbwzNYbf2DSEMh1P9rj PUJKdLTOLWFGpB+QSJFXP/yE9nURDRApUNqoPN+0ewGctAc1ZxuYQo7XAQnuf/oKaa7y 5mQw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=4LxcdXE4D1IxsThm3AhK7U6oJIApRsieXToTt1nK21A=; b=Lu2Ot97pNWSJHzqX10GU4eV7/seaPkKA/PRVKfQPaIXHzkGlgM0I5IIxtng1oVTJvV qRGi4a1RvsmDIQb8bS5zRUNzxGvXTlOkCo+oVopy22IynsRMuaZ6HuHC5zE6t/AUSR14 ziB3CGq1dbDm5p5ecYd62Q5HmlNHx7QzZeqG6byn7taou4sjLjA1ywvkaS7QCUwpYKbz LOymm0PPj/LR059CFYT0X0LFiBWJufU3V324yIfEXZ8nyvJlcDegSK3W8BlRXGewzKDe RXv6oWdBzSShwt4r1623hPCWzAn7AFqcfYVcVH1R2Ybz/SWNBjCKx3idDmt1fpgDdatU /TyA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id u22si11718392eja.142.2020.04.15.15.09.49; Wed, 15 Apr 2020 15:10:12 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2634885AbgDOGas (ORCPT + 99 others); Wed, 15 Apr 2020 02:30:48 -0400 Received: from mail-pj1-f66.google.com ([209.85.216.66]:40025 "EHLO mail-pj1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2634860AbgDOGao (ORCPT ); Wed, 15 Apr 2020 02:30:44 -0400 Received: by mail-pj1-f66.google.com with SMTP id a22so1897026pjk.5; 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=s4N0X4UW5dadmnNR0mWMOazvtZM0Dx1BKiO0E+IZShk++erPeNdVkqduzMQteG2vLf xm2jUfZS41xbG5g5Los2JHdGscep2QjyqWrZOlqWduhpGuuVK6WiK7Un1RjhfOt8msg+ IFlFbNJQ4ltVVp5SpBXjgAQz+8QFHtD62uOeIvInZQVtHL9FXA9zUWpcW9+4SpJzNNkR BW/bL7e21cGcxizPlEzBC3344rO75d+Hv/EV4FUj1RXj2+1ZFBtd5MMcaVMCXSZBbPka efFhIudidFd8tEhl4YOhd9+84+RV6UDjfzEx46CizHS1aT8p7SCICieZFvmp5iVwWD0m R8PA== X-Gm-Message-State: AGi0PuZAmulZ2b5W5IbCCcRQ4ukfYGxQ1p8FEBKNp0lgxIiEZRYMkD01 PrcMU2WssoHF/bjCsW+Jhro= 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) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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