From: Prakash Sangappa <prakash.sangappa@oracle.com>
To: Dave Hansen <dave.hansen@intel.com>,
linux-kernel@vger.kernel.org, linux-mm@kvack.org
Subject: Re: [PATCH RFC] hugetlbfs 'noautofill' mount option
Date: Tue, 2 May 2017 16:34:18 -0700 [thread overview]
Message-ID: <03127895-3c5a-5182-82de-3baa3116749e@oracle.com> (raw)
In-Reply-To: <7ff6fb32-7d16-af4f-d9d5-698ab7e9e14b@intel.com>
On 5/2/17 2:32 PM, Dave Hansen wrote:
> On 05/01/2017 11:00 AM, Prakash Sangappa wrote:
>> This patch adds a new hugetlbfs mount option 'noautofill', to indicate that
>> pages should not be allocated at page fault time when accessed thru mmapped
>> address.
> I think the main argument against doing something like this is further
> specializing hugetlbfs. I was really hoping that userfaultfd would be
> usable for your needs here.
>
> Could you elaborate on other options that you considered? Did you look
> at userfaultfd? What about an madvise() option that disallows backing
> allocations?
Yes, we did consider userfaultfd and madvise(). The use case in mind is
the database.
With a database, large number of single threaded processes are involved
which
will map hugetlbfs file and use it for shared memory. The concern with
using
userfaultfd is the overhead of setup and having an additional thread per
process
to monitor the userfaultfd. Even if the additional thread can be
avoided, by using
an external monitor process and each process sending the userfaultfd to
this
monitor process, setup overhead exists.
Similarly, a madvise() option also requires additional system call by every
process mapping the file, this is considered a overhead for the database.
If we do consider a new madvise() option, will it be acceptable since
this will be
specifically for hugetlbfs file mappings? If so, would a new flag to mmap()
call itself be acceptable, which would define the proposed behavior?.
That way
no additional system calls need to be made. Again this mmap flag would be
applicable specifically to hugetlbfs file mappings
With the proposed mount option, it would enforce one consistent behavior
and the application using this filesystem would not have to take additional
steps as with userfaultfd or madvise().
next prev parent reply other threads:[~2017-05-02 23:34 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <326e38dd-b4a8-e0ca-6ff7-af60e8045c74@oracle.com>
2017-05-01 18:00 ` [PATCH RFC] hugetlbfs 'noautofill' mount option Prakash Sangappa
2017-05-02 10:53 ` Anshuman Khandual
2017-05-02 16:07 ` Prakash Sangappa
2017-05-02 21:32 ` Dave Hansen
2017-05-02 23:34 ` Prakash Sangappa [this message]
2017-05-02 23:43 ` Dave Hansen
2017-05-03 19:02 ` Prakash Sangappa
2017-05-08 5:57 ` Prakash Sangappa
2017-05-08 15:58 ` Dave Hansen
2017-05-08 22:12 ` prakash.sangappa
2017-05-09 8:58 ` Christoph Hellwig
2017-05-09 20:59 ` Prakash Sangappa
2017-05-16 16:51 ` Prakash Sangappa
2017-06-16 13:15 ` Andrea Arcangeli
2017-06-20 23:35 ` Prakash Sangappa
2017-06-27 20:57 ` Prakash Sangappa
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=03127895-3c5a-5182-82de-3baa3116749e@oracle.com \
--to=prakash.sangappa@oracle.com \
--cc=dave.hansen@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.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;
as well as URLs for NNTP newsgroup(s).