lkml.org 
[lkml]   [2020]   [Apr]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH v3 1/5] kernel/sysctl: support setting sysctl parameters from kernel command line
From
Date
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

\
 
 \ /
  Last update: 2020-04-28 10:09    [W:0.109 / U:0.120 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site