From: Christoph Hellwig <hch@infradead.org>
To: David Gibson <david@gibson.dropbear.id.au>,
Andrew Morton <akpm@osdl.org>, Anton Blanchard <anton@samba.org>,
Adam Litke <agl@us.ibm.com>,
Benjamin Herrenschmidt <benh@kernel.crashing.org>,
linux-kernel@vger.kernel.org, linuxppc64-dev@lists.linuxppc.org
Subject: Re: More convenient way to grab hugepage memory
Date: Thu, 13 May 2004 08:49:03 +0100 [thread overview]
Message-ID: <20040513084903.B6631@infradead.org> (raw)
In-Reply-To: <20040513055520.GF27403@zax>; from david@gibson.dropbear.id.au on Thu, May 13, 2004 at 03:55:20PM +1000
On Thu, May 13, 2004 at 03:55:20PM +1000, David Gibson wrote:
> Andrew, please apply:
>
> At present, getting a block of (quasi-) anonymous memory mapping with
> hugepages is a slightly convoluted process, involving creating a dummy
> file in a hugetlbfs filesystem. In particular that means finding
> where such a filesystem is mounted, for which there is no standard
> mechanism. Getting hugepage SysV shm segments is easier, just requing
> the SHM_HUGETLB flag. This patch adds an analagous MAP_HUGETLB mmap()
> flag to easily request that a block of anonymous memory come from
> hugepages.
>
> [The MAP_HUGETLB flag has the side effect that MAP_SHARED semantics
> will apply, even if MAP_PRIVATE is specific - but that's no different
> to explicitly mapping hugetlbfs].
Please don't do this. It's messing all over sensitive codepathes in the
kernel, creating special cases and bloat of what you could with simple a
simpe hugetlb_mmap() wrapper ala (pseudocode)
hugetlb_mmap()
{
fd = open(file in hugetlbfs)
mmap(.., fd, ...)
close(fd)
}
in some library. The hugetlbfs implementation was chosen exactly because
if kept the impact of hugetlb pages down to normal kernel codepathes.
next prev parent reply other threads:[~2004-05-13 7:49 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-05-13 5:55 David Gibson
2004-05-13 6:05 ` Muli Ben-Yehuda
2004-05-13 6:20 ` David Gibson
2004-05-13 6:45 ` Roland Dreier
2004-05-13 6:59 ` William Lee Irwin III
2004-05-13 7:04 ` William Lee Irwin III
2004-05-13 7:11 ` William Lee Irwin III
2004-05-13 7:09 ` Benjamin Herrenschmidt
2004-05-13 7:13 ` William Lee Irwin III
2004-05-13 8:05 ` Muli Ben-Yehuda
2004-05-13 6:06 ` William Lee Irwin III
2004-05-13 6:27 ` William Lee Irwin III
2004-05-13 7:49 ` Christoph Hellwig [this message]
2004-05-13 8:06 ` Christoph Hellwig
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=20040513084903.B6631@infradead.org \
--to=hch@infradead.org \
--cc=agl@us.ibm.com \
--cc=akpm@osdl.org \
--cc=anton@samba.org \
--cc=benh@kernel.crashing.org \
--cc=david@gibson.dropbear.id.au \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc64-dev@lists.linuxppc.org \
/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
all inboxes | Powered by JetHome®