All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alexander Graf <agraf@suse.de>
To: Hugh Dickins <hughd@google.com>
Cc: Johannes Weiner <hannes@cmpxchg.org>,
	"linux-mm@kvack.org" <linux-mm@kvack.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Rik van Riel <riel@redhat.com>, Mel Gorman <mgorman@suse.de>,
	Andrew Morton <akpm@linux-foundation.org>,
	Peter Zijlstra <peterz@infradead.org>,
	Ingo Molnar <mingo@kernel.org>, Hugh Dickins <hughd@google.com>,
	Izik Eidus <izik.eidus@ravellosystems.com>,
	Andrea Arcangeli <aarcange@redhat.com>,
	Kay Sievers <kay@vrfy.org>, Dave Hansen <dave.hansen@intel.com>
Subject: Re: [PATCH] ksm: Expose configuration via sysctl
Date: Wed, 26 Feb 2014 15:49:20 +0800	[thread overview]
Message-ID: <33B27E4E-11A7-45FD-B708-C2B380AB6608@suse.de> (raw)
In-Reply-To: <alpine.LSU.2.11.1402251652230.979@eggly.anvils>



> Am 26.02.2014 um 09:05 schrieb Hugh Dickins <hughd@google.com>:
> 
>> On Tue, 25 Feb 2014, Johannes Weiner wrote:
>>> On Tue, Feb 25, 2014 at 12:28:04AM +0100, Alexander Graf wrote:
>>> Configuration of tunables and Linux virtual memory settings has traditionally
>>> happened via sysctl. Thanks to that there are well established ways to make
>>> sysctl configuration bits persistent (sysctl.conf).
>>> 
>>> KSM introduced a sysfs based configuration path which is not covered by user
>>> space persistent configuration frameworks.
>>> 
>>> In order to make life easy for sysadmins, this patch adds all access to all
>>> KSM tunables via sysctl as well. That way sysctl.conf works for KSM as well,
>>> giving us a streamlined way to make KSM configuration persistent.
>> 
>> ksm can be a module, so this won't work.
> 
> That's news to me.  Are you writing of some Red Hat patches, or just
> misled by the "module_init(ksm_init)" which used the last line of ksm.c?

Ugh, sorry. I should have double-checked this. KSM is bool in Kconfig and so is THP.

> 
> I don't mind Alex's patch, but I do think the same should be done for
> THP as for KSM, and a general

I agree.

> solution more attractive than more #ifdefs
> one by one.  Should a general

I don't see a good alternative to this.

> solution just be in userspace, in sysctl(8)?

User space needs to have the ability to list available sysctls, so we need to have an enumerable map between sys and sysctl somewhere. Keeping that list close to where the actual files are implemented seems to make sense to me, as it's very hard to miss out on addition and removal of parameters throughout the stack this way. That's why I put it here.


Alex


WARNING: multiple messages have this Message-ID (diff)
From: Alexander Graf <agraf@suse.de>
Cc: Johannes Weiner <hannes@cmpxchg.org>,
	"linux-mm@kvack.org" <linux-mm@kvack.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Rik van Riel <riel@redhat.com>, Mel Gorman <mgorman@suse.de>,
	Andrew Morton <akpm@linux-foundation.org>,
	Peter Zijlstra <peterz@infradead.org>,
	Ingo Molnar <mingo@kernel.org>, Hugh Dickins <hughd@google.com>,
	Izik Eidus <izik.eidus@ravellosystems.com>,
	Andrea Arcangeli <aarcange@redhat.com>,
	Kay Sievers <kay@vrfy.org>, Dave Hansen <dave.hansen@intel.com>
Subject: Re: [PATCH] ksm: Expose configuration via sysctl
Date: Wed, 26 Feb 2014 15:49:20 +0800	[thread overview]
Message-ID: <33B27E4E-11A7-45FD-B708-C2B380AB6608@suse.de> (raw)
In-Reply-To: <alpine.LSU.2.11.1402251652230.979@eggly.anvils>



> Am 26.02.2014 um 09:05 schrieb Hugh Dickins <hughd@google.com>:
> 
>> On Tue, 25 Feb 2014, Johannes Weiner wrote:
>>> On Tue, Feb 25, 2014 at 12:28:04AM +0100, Alexander Graf wrote:
>>> Configuration of tunables and Linux virtual memory settings has traditionally
>>> happened via sysctl. Thanks to that there are well established ways to make
>>> sysctl configuration bits persistent (sysctl.conf).
>>> 
>>> KSM introduced a sysfs based configuration path which is not covered by user
>>> space persistent configuration frameworks.
>>> 
>>> In order to make life easy for sysadmins, this patch adds all access to all
>>> KSM tunables via sysctl as well. That way sysctl.conf works for KSM as well,
>>> giving us a streamlined way to make KSM configuration persistent.
>> 
>> ksm can be a module, so this won't work.
> 
> That's news to me.  Are you writing of some Red Hat patches, or just
> misled by the "module_init(ksm_init)" which used the last line of ksm.c?

Ugh, sorry. I should have double-checked this. KSM is bool in Kconfig and so is THP.

> 
> I don't mind Alex's patch, but I do think the same should be done for
> THP as for KSM, and a general

I agree.

> solution more attractive than more #ifdefs
> one by one.  Should a general

I don't see a good alternative to this.

> solution just be in userspace, in sysctl(8)?

User space needs to have the ability to list available sysctls, so we need to have an enumerable map between sys and sysctl somewhere. Keeping that list close to where the actual files are implemented seems to make sense to me, as it's very hard to miss out on addition and removal of parameters throughout the stack this way. That's why I put it here.


Alex

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

  reply	other threads:[~2014-02-26  8:05 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-24 23:28 [PATCH] ksm: Expose configuration via sysctl Alexander Graf
2014-02-24 23:28 ` Alexander Graf
2014-02-25 12:33 ` Rik van Riel
2014-02-25 12:33   ` Rik van Riel
2014-02-25 17:15 ` Johannes Weiner
2014-02-25 17:15   ` Johannes Weiner
2014-02-25 17:19   ` Peter Zijlstra
2014-02-25 17:19     ` Peter Zijlstra
2014-02-25 23:16     ` Alexander Graf
2014-02-25 23:16       ` Alexander Graf
2014-02-25 23:50       ` Kay Sievers
2014-02-25 23:50         ` Kay Sievers
2014-02-26  1:05   ` Hugh Dickins
2014-02-26  1:05     ` Hugh Dickins
2014-02-26  7:49     ` Alexander Graf [this message]
2014-02-26  7:49       ` Alexander Graf
2014-02-25 17:34 ` Dave Hansen
2014-02-25 17:34   ` Dave Hansen
2014-02-25 23:09   ` Alexander Graf
2014-02-25 23:09     ` Alexander Graf
2014-02-26  0:10     ` Dave Hansen
2014-02-26  0:10       ` Dave Hansen
2014-02-26 15:36       ` Sven-Haegar Koch
2014-02-26 15:36         ` Sven-Haegar Koch
2014-02-26 17:32         ` Alexander Graf
2014-02-26 17:32           ` Alexander Graf
2014-02-26  0:02   ` Kay Sievers
2014-02-26  0:02     ` Kay Sievers

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=33B27E4E-11A7-45FD-B708-C2B380AB6608@suse.de \
    --to=agraf@suse.de \
    --cc=aarcange@redhat.com \
    --cc=akpm@linux-foundation.org \
    --cc=dave.hansen@intel.com \
    --cc=hannes@cmpxchg.org \
    --cc=hughd@google.com \
    --cc=izik.eidus@ravellosystems.com \
    --cc=kay@vrfy.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mgorman@suse.de \
    --cc=mingo@kernel.org \
    --cc=peterz@infradead.org \
    --cc=riel@redhat.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.