Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1682378

Re: [RFC PATCH v2] userfaultfd: Add feature to request for a signal delivery

From Mike Rapoport <rppt@linux.vnet.ibm.com>
Newsgroups linux.kernel
Subject Re: [RFC PATCH v2] userfaultfd: Add feature to request for a signal delivery
Date 2017-07-06 14:20 +0200
Message-ID <u0dVf-4cO-3@gated-at.bofh.it> (permalink)
References <tZAKe-3xa-19@gated-at.bofh.it> <tZAKe-3xa-17@gated-at.bofh.it> <u02ZP-5fS-17@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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.

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Re: [RFC PATCH v2] userfaultfd: Add feature to request for a signal  delivery Mike Rapoport <rppt@linux.vnet.ibm.com> - 2017-07-04 20:30 +0200
  Re: [RFC PATCH v2] userfaultfd: Add feature to request for a signal  delivery "prakash.sangappa" <prakash.sangappa@oracle.com> - 2017-07-06 02:40 +0200
    Re: [RFC PATCH v2] userfaultfd: Add feature to request for a signal  delivery Mike Rapoport <rppt@linux.vnet.ibm.com> - 2017-07-06 14:20 +0200
      Re: [RFC PATCH v2] userfaultfd: Add feature to request for a signal delivery Jon Pry <jonpry@gmail.com> - 2017-07-07 22:30 +0200

csiph-web