From: Alex Thorlton <athorlton@sgi.com>
To: David Rientjes <rientjes@google.com>
Cc: linux-kernel@vger.kernel.org, Li Zefan <lizefan@huawei.com>,
Rob Landley <rob@landley.net>,
Andrew Morton <akpm@linux-foundation.org>,
Mel Gorman <mgorman@suse.de>, Rik van Riel <riel@redhat.com>,
"Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>,
Johannes Weiner <hannes@cmpxchg.org>,
Xiao Guangrong <xiaoguangrong@linux.vnet.ibm.com>,
linux-doc@vger.kernel.org, linux-mm@kvack.org,
Robin Holt <holt@sgi.com>
Subject: Re: [PATCH v2] Make transparent hugepages cpuset aware
Date: Tue, 18 Jun 2013 11:45:37 -0500 [thread overview]
Message-ID: <20130618164537.GJ16067@sgi.com> (raw)
In-Reply-To: <alpine.DEB.2.02.1306111517200.6141@chino.kir.corp.google.com>
On Tue, Jun 11, 2013 at 03:20:09PM -0700, David Rientjes wrote:
> On Tue, 11 Jun 2013, Alex Thorlton wrote:
>
> > This patch adds the ability to control THPs on a per cpuset basis.
> > Please see
> > the additions to Documentation/cgroups/cpusets.txt for more
> > information.
> >
>
> What's missing from both this changelog and the documentation you
> point to
> is why this change is needed.
>
> I can understand how you would want a subset of processes to not use
> thp
> when it is enabled. This is typically where MADV_NOHUGEPAGE is used
> with
> some type of malloc hook.
>
> I don't think we need to do this on a cpuset level, so unfortunately I
> think this needs to be reworked. Would it make sense to add a
> per-process
> tunable to always get MADV_NOHUGEPAGE behavior for all of its sbrk()
> and
> mmap() calls? Perhaps, but then you would need to justify why it
> can't be
> done with a malloc hook in userspace.
>
> This seems to just be working around a userspace issue or for a matter
> of
> convenience, right?
David,
Thanks for your input, however, I believe the method of using a malloc
hook falls apart when it comes to static binaries, since we wont' have
any shared libraries to hook into. Although using a malloc hook is a
perfectly suitable solution for most cases, we're looking to implement a
solution that can be used in all situations.
Aside from that particular shortcoming of the malloc hook solution,
there are some other situations having a cpuset-based option is a
much simpler and more efficient solution than the alternatives. One
such situation that comes to mind would be an environment where a batch
scheduler is in use to ration system resources. If an administrator
determines that a users jobs run more efficiently with thp always on,
the administrator can simply set the users jobs to always run with that
setting, instead of having to coordinate with that user to get them to
run their jobs in a different way. I feel that, for cases such as this,
the this additional flag is in line with the other capabilities that
cgroups and cpusets provide.
While there are likely numerous other situations where having a flag to
control thp on the cpuset level makes things a bit easier to manage, the
one real show-stopper here is that we really have no other options when
it comes to static binaries.
- Alex Thorlton
--
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>
next prev parent reply other threads:[~2013-06-18 16:45 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-06-11 16:14 [PATCH v2] Make transparent hugepages cpuset aware Alex Thorlton
2013-06-11 22:20 ` David Rientjes
2013-06-18 16:45 ` Alex Thorlton [this message]
2013-06-19 0:01 ` David Rientjes
2013-06-19 9:32 ` Robin Holt
2013-06-19 21:24 ` David Rientjes
2013-06-20 2:27 ` Robin Holt
2013-06-20 2:43 ` David Rientjes
2013-06-20 3:10 ` Mike Galbraith
2013-06-20 20:37 ` David Rientjes
2013-07-29 19:42 ` Alex Thorlton
2013-06-20 3:34 ` Li Zefan
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=20130618164537.GJ16067@sgi.com \
--to=athorlton@sgi.com \
--cc=akpm@linux-foundation.org \
--cc=hannes@cmpxchg.org \
--cc=holt@sgi.com \
--cc=kirill.shutemov@linux.intel.com \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=lizefan@huawei.com \
--cc=mgorman@suse.de \
--cc=riel@redhat.com \
--cc=rientjes@google.com \
--cc=rob@landley.net \
--cc=xiaoguangrong@linux.vnet.ibm.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).