From: "Adam M. Costello" <linux-kernel.amc+0+@nicemice.net>
To: linux-kernel@vger.kernel.org
Subject: Could MADV_REMOVE work with hugetlbfs?
Date: Wed, 9 Nov 2011 21:48:26 +0000 [thread overview]
Message-ID: <20111109212737.35z~@nicemice.net> (raw)
madvise(MADV_REMOVE) punches a hole in a file (via truncate_range()).
It's the only way (as far as I know) to return an arbitrary page of
shared memory to the system. It's supported by tmpfs, but not by
hugetlbfs.
So a regular page of shared memory (from shmget() or from mmap() on
a tmpfs file) can be returned, but huge page of shared memory (from
shmget(SHM_HUGETLB) or from mmap() on a hugetlbfs file) cannot be
returned.
Has anyone thought about adding support for truncate_range and
MADV_REMOVE to hugetlbfs? How hard would that be?
Thanks,
AMC
next reply other threads:[~2011-11-09 21:54 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-11-09 21:48 Adam M. Costello [this message]
2011-11-17 2:18 ` Hugh Dickins
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='20111109212737.35z~@nicemice.net' \
--to=linux-kernel.amc+0+@nicemice.net \
--cc=linux-kernel@vger.kernel.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®