From: Vlastimil Babka <vbabka@suse.cz>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: Luis Chamberlain <mcgrof@kernel.org>,
Kees Cook <keescook@chromium.org>,
Iurii Zaikin <yzaikin@google.com>,
linux-kernel@vger.kernel.org, linux-api@vger.kernel.org,
linux-mm@kvack.org, Ivan Teterevkov <ivan.teterevkov@nutanix.com>,
Michal Hocko <mhocko@kernel.org>,
David Rientjes <rientjes@google.com>,
Matthew Wilcox <willy@infradead.org>,
"Eric W . Biederman" <ebiederm@xmission.com>,
"Guilherme G . Piccoli" <gpiccoli@canonical.com>,
Alexey Dobriyan <adobriyan@gmail.com>,
Thomas Gleixner <tglx@linutronix.de>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Christian Brauner <christian.brauner@ubuntu.com>,
Masami Hiramatsu <mhiramat@kernel.org>,
Michal Hocko <mhocko@suse.com>
Subject: Re: [PATCH v3 1/5] kernel/sysctl: support setting sysctl parameters from kernel command line
Date: Tue, 28 Apr 2020 10:09:37 +0200 [thread overview]
Message-ID: <d7d01e9e-6b6d-47ce-c750-cd7296e30613@suse.cz> (raw)
In-Reply-To: <20200427113331.f0c1e8e7cee98644260448d3@linux-foundation.org>
On 4/27/20 8:33 PM, Andrew Morton wrote:
> On Mon, 27 Apr 2020 20:04:29 +0200 Vlastimil Babka <vbabka@suse.cz> wrote:
>
>> ...
>>
>> + sysctl.*= [KNL]
>> + Set a sysctl parameter, right before loading the init
>> + process, as if the value was written to the respective
>> + /proc/sys/... file. Both '.' and '/' are recognized as
>> + separators. Unrecognized parameters and invalid values
>> + are reported in the kernel log. Sysctls registered
>> + later by a loaded module cannot be set this way.
>> + Example: sysctl.vm.swappiness=40
>
> Why support "."? I think only supporting "/" is perfectly adequate and
> simplifies documentation. It aligns the command-line syntax with the
> rest of the sysctl documentation. I'm not seeing the need to provide
> two ways of doing the same thing?
AFAIK the "." is traditional, and "/" is a newer artefact of moving from the
binary syscall form to procfs based form. So by "command-line syntax" you mean
echo and cat, not sysctl tool? Because "man sysctl" says:
variable
The name of a key to read from. An example is kernel.ostype. The '/'
separator is also accepted in place of a '.'.
So I'm not strongly against supporting only / but I expect most people are used
to the . and it will take them two attempts to pass the sysctl boot parameter
correctly if they don't use it regularly - first trying . form, wonder why it
doesn't work, then read the doc and realize it's not supported?
Vlastimil
next prev parent reply other threads:[~2020-04-28 8:09 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-27 18:04 [PATCH v3 0/5] " Vlastimil Babka
2020-04-27 18:04 ` [PATCH v3 1/5] kernel/sysctl: " Vlastimil Babka
2020-04-27 18:33 ` Andrew Morton
2020-04-28 8:09 ` Vlastimil Babka [this message]
2020-04-28 10:18 ` Michal Hocko
2020-04-27 18:04 ` [PATCH v3 2/5] kernel/sysctl: support handling command line aliases Vlastimil Babka
2020-04-27 18:04 ` [PATCH v3 3/5] kernel/hung_task convert hung_task_panic boot parameter to sysctl Vlastimil Babka
2020-04-27 18:04 ` [PATCH v3 4/5] tools/testing/selftests/sysctl/sysctl.sh: support CONFIG_TEST_SYSCTL=y Vlastimil Babka
2020-04-27 18:39 ` Luis Chamberlain
2020-04-27 18:04 ` [PATCH v3 5/5] lib/test_sysctl: support testing of sysctl. boot parameter Vlastimil Babka
2020-04-27 18:39 ` Luis Chamberlain
2020-05-11 11:05 ` Vlastimil Babka
2020-05-11 18:31 ` Luis Chamberlain
2020-05-13 8:58 ` Vlastimil Babka
2020-05-13 13:15 ` Luis Chamberlain
2020-05-13 13:17 ` Luis Chamberlain
2020-05-15 16:02 ` Vlastimil Babka
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=d7d01e9e-6b6d-47ce-c750-cd7296e30613@suse.cz \
--to=vbabka@suse.cz \
--cc=adobriyan@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=christian.brauner@ubuntu.com \
--cc=ebiederm@xmission.com \
--cc=gpiccoli@canonical.com \
--cc=gregkh@linuxfoundation.org \
--cc=ivan.teterevkov@nutanix.com \
--cc=keescook@chromium.org \
--cc=linux-api@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mcgrof@kernel.org \
--cc=mhiramat@kernel.org \
--cc=mhocko@kernel.org \
--cc=mhocko@suse.com \
--cc=rientjes@google.com \
--cc=tglx@linutronix.de \
--cc=willy@infradead.org \
--cc=yzaikin@google.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox