lkml.org 
[lkml]   [2020]   [Mar]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFC v2 1/2] kernel/sysctl: support setting sysctl parameters from kernel command line
On Thu, Mar 26, 2020 at 07:58:29AM +0100, Michal Hocko wrote:
> On Wed 25-03-20 17:20:40, Eric W. Biederman wrote:
> > Vlastimil Babka <vbabka@suse.cz> writes:
> [...]
> > > + if (strncmp(param, "sysctl.", sizeof("sysctl.") - 1))
> > > + return 0;
> >
> > Is there any way we can use a slash separated path. I know
> > in practice there are not any sysctl names that don't have
> > a '.' in them but why should we artifically limit ourselves?
>
> Because this is the normal userspace interface? Why should it be any
> different from calling sysctl?
> [...]

Imho, we should use ".". Kernel developers aren't the ones setting
these options, admins are and if I think back to the times doing that as
a job at uni I'd be very confused if I learned that I get to set sysctl
options through the kernel command but need to use yet another format
than what I usually do to set those from the shell. Consistency is most
of the times to be preferred imho.

Also, the kernel docs illustrate that the "." syntax is used for other
keys as well (e.g. acpi.<option>) and userspace options passed via the
kernel command line have standardized on the "." format as well, e.g.
systemd appends in the same format (e.g.
systemd.unified_cgroup_hierarchy, systemd.unit what have you).

Christian

\
 
 \ /
  Last update: 2020-03-26 14:31    [W:0.074 / U:1.880 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site