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.2 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,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 4A469C2BA19 for ; Wed, 15 Apr 2020 08:56:40 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 10EA720737 for ; Wed, 15 Apr 2020 08:56:39 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 10EA720737 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=suse.cz Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 94A1F8E0005; Wed, 15 Apr 2020 04:56:39 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 8FA4C8E0001; Wed, 15 Apr 2020 04:56:39 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 7E8E78E0005; Wed, 15 Apr 2020 04:56:39 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0044.hostedemail.com [216.40.44.44]) by kanga.kvack.org (Postfix) with ESMTP id 644628E0001 for ; Wed, 15 Apr 2020 04:56:39 -0400 (EDT) Received: from smtpin13.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id 24653181AEF21 for ; Wed, 15 Apr 2020 08:56:39 +0000 (UTC) X-FDA: 76709483718.13.food43_915522bb90918 X-HE-Tag: food43_915522bb90918 X-Filterd-Recvd-Size: 3603 Received: from mx2.suse.de (mx2.suse.de [195.135.220.15]) by imf34.hostedemail.com (Postfix) with ESMTP for ; Wed, 15 Apr 2020 08:56:38 +0000 (UTC) X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id DD294AF92; Wed, 15 Apr 2020 08:56:35 +0000 (UTC) Subject: Re: [PATCH v2 0/3] support setting sysctl parameters from kernel command line To: Masami Hiramatsu Cc: Andrew Morton , Luis Chamberlain , 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 References: <20200414113222.16959-1-vbabka@suse.cz> <20200415122359.939364e2c54c389c6b3f6457@kernel.org> From: Vlastimil Babka Message-ID: <3fc1303a-cb57-b96e-ce77-7ff6407ab538@suse.cz> Date: Wed, 15 Apr 2020 10:56:35 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.6.0 MIME-Version: 1.0 In-Reply-To: <20200415122359.939364e2c54c389c6b3f6457@kernel.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US 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: On 4/15/20 5:23 AM, 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? "Instead of" - no, as that would defeat the scenario of "I just want to set this one sysctl in grub (possibly interactively) and not update initrd for that". If constructing bootconfig is of similar effort of loading sysctl.conf from initrd, then I see little benefit? "in addition to" - sure! but I hoped that's what already happens as it seemed to me that options from bootconfig are appended to the command line that's then parsed by everyone else, no? But I'll try it to be sure. > With the bootconfig, you can describe the sysctl parameters in an > independent file as same as /etc/sysctl.conf. It is easy to convert > form sysctl.conf to bootconfig because bootconfig format is simply > enhanced structured sysctl.conf :). What we just need is; > > (echo "sysctl {"; cat "/etc/sysctl.conf"; echo "}") >> sysctl.bconf > bootconfig -a sysctl.bconf /boot/initrd.img > > Even with only your patch, since bootconfig can pass the options which > start with "kernel." prefix to kernel command line, so; > > (echo "kernel.sysctl {"; cat "/etc/sysctl.conf"; echo "}") >> sysctl.bconf > bootconfig -a sysctl.bconf /boot/initrd.img Hmm I hope I figure out if the way virtme creates initrd on the fly supports hooking a bootconfig addition :) > should work. > > Thank you, > >