From: Mike Rapoport <rppt@linux.vnet.ibm.com>
To: "prakash.sangappa" <prakash.sangappa@oracle.com>
Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org,
linux-api@vger.kernel.org, Andrea Arcangeli <aarcange@redhat.com>,
Dave Hansen <dave.hansen@intel.com>,
Christoph Hellwig <hch@infradead.org>,
Mike Kravetz <mike.kravetz@oracle.com>,
Michal Hocko <mhocko@kernel.org>
Subject: Re: [RFC PATCH v2] userfaultfd: Add feature to request for a signal delivery
Date: Thu, 6 Jul 2017 15:09:50 +0300 [thread overview]
Message-ID: <20170706120949.GE9625@rapoport-lnx> (raw)
In-Reply-To: <c1fa4d29-cbc9-6606-3e1f-9953078900a3@oracle.com>
On Wed, Jul 05, 2017 at 05:41:14PM -0700, prakash.sangappa wrote:
>
>
> On 07/04/2017 11:28 AM, Mike Rapoport wrote:
> >On Tue, Jun 27, 2017 at 09:08:40AM -0700, Prakash Sangappa wrote:
> >>Applications like the database use hugetlbfs for performance reason.
> >>Files on hugetlbfs filesystem are created and huge pages allocated
> >>using fallocate() API. Pages are deallocated/freed using fallocate() hole
> >>punching support. These files are mmap'ed and accessed by many
> >>single threaded processes as shared memory. The database keeps
> >>track of which offsets in the hugetlbfs file have pages allocated.
> >>
[ ... ]
> >>+ *
> >>+ * UFFD_FEATURE_SIGBUS feature means no page-fault
> >>+ * (UFFD_EVENT_PAGEFAULT) event will be delivered, instead
> >>+ * a SIGBUS signal will be sent to the faulting process.
> >>+ * The application process can enable this behavior by adding
> >>+ * it to uffdio_api.features.
> >I think that it maybe worth making UFFD_FEATURE_SIGBUS mutually exclusive
> >with the non-cooperative events. There is no point of having monitor if the
> >page fault handler will anyway just kill the faulting process.
>
>
> Will this not be too restrictive?. The non-cooperative events could
> still be useful if an application wants to track changes
> to VA ranges that are registered even though it expects
> a signal on page fault.
I wouldn't say that we must make UFFD_FEATURE_SIGBUS mutually exclusive
with other events, but, IMHO, it's something we should at least think
about.
In my view, if you anyway have uffd monitor, you may process page faults
there as well and then there is no actual need in UFFD_FEATURE_SIGBUS.
--
Sincerely yours,
Mike.
--
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>
prev parent reply other threads:[~2017-07-06 12:10 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-06-27 16:08 [RFC PATCH v2] userfaultfd: Add feature to request for a signal delivery Prakash Sangappa
2017-07-04 18:28 ` Mike Rapoport
2017-07-06 0:41 ` prakash.sangappa
2017-07-06 12:09 ` Mike Rapoport [this message]
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=20170706120949.GE9625@rapoport-lnx \
--to=rppt@linux.vnet.ibm.com \
--cc=aarcange@redhat.com \
--cc=dave.hansen@intel.com \
--cc=hch@infradead.org \
--cc=linux-api@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mhocko@kernel.org \
--cc=mike.kravetz@oracle.com \
--cc=prakash.sangappa@oracle.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).