linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Andrea Arcangeli <aarcange@redhat.com>
To: Ben Hutchings <ben@decadent.org.uk>
Cc: linux-mm@kvack.org, Mel Gorman <mel@csn.ul.ie>,
	Johannes Weiner <jweiner@redhat.com>,
	Rik van Riel <riel@redhat.com>, Hugh Dickins <hughd@google.com>
Subject: Re: sysfs interface to transparent hugepages
Date: Mon, 21 Mar 2011 15:08:12 +0100	[thread overview]
Message-ID: <20110321140812.GD5719@random.random> (raw)
In-Reply-To: <1300713183.26693.343.camel@localhost>

On Mon, Mar 21, 2011 at 01:13:03PM +0000, Ben Hutchings wrote:
> You have tristates {never, madvise, always} for various THM features.
> Internally, these are represented as a pair of flags.  They are exposed
> through sysfs as tristates, but then they are also exposed as flags.

They must be bitflags for performance and cacheline saving reasons in
the kernel (1 bitflag not enough in kernel for a userland
tristate). They're more intuitive as tristate in the same file for the
user to set (some combination of these flags is forbidden so exposing
the flags to the user doesn't sound good idea, also considering it's
an internal representation which may change, keeping the two separated
is best, especially if you want your current lib not to break).

There is no expectation however that you have to alter any of these
settings even in server environment other than for debugging purposes:
with the exception of: 1) pages_to_scan, 2) scan_sleep_millisecs 3)
alloc_sleep_millisecs inside the khugepaged dir, and those three are
in a format that your current sysfs lib will mangle just fine.

If you've a lib that pretends to turn off THP as root, you may as well
handle the cfq/deadline I/O scheduler switch in the same lib. Not
really sure if your effort is worth it considering it will slightly
complicate things in shell usage for debug purposes (I'd find more
intuitive if also cpufreq governors were shown and selected like io
schedulers).

But again I'm fully neutral on issues like these as long as the
patches don't break anything I'm surely fine if others like your
changes.

--
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/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

  reply	other threads:[~2011-03-21 14:09 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-21  3:00 sysfs interface to transparent hugepages Ben Hutchings
2011-03-21 12:42 ` Andrea Arcangeli
2011-03-21 13:13   ` Ben Hutchings
2011-03-21 14:08     ` Andrea Arcangeli [this message]
2011-03-21 14:25       ` Ben Hutchings

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=20110321140812.GD5719@random.random \
    --to=aarcange@redhat.com \
    --cc=ben@decadent.org.uk \
    --cc=hughd@google.com \
    --cc=jweiner@redhat.com \
    --cc=linux-mm@kvack.org \
    --cc=mel@csn.ul.ie \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).