[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20200416144942.GQ5100@ziepe.ca>
Date: Thu, 16 Apr 2020 11:49:42 -0300
From: Jason Gunthorpe <jgg@...pe.ca>
To: Brian Geffon <bgeffon@...gle.com>
Cc: Andrea Arcangeli <aarcange@...hat.com>,
Hillf Danton <hdanton@...a.com>, Peter Xu <peterx@...hat.com>,
linux-mm <linux-mm@...ck.org>,
LKML <linux-kernel@...r.kernel.org>,
Sonny Rao <sonnyrao@...gle.com>
Subject: Re: Userfaultfd doesn't seem to break out of poll on fd close
On Wed, Apr 15, 2020 at 06:15:26PM -0700, Brian Geffon wrote:
> And all of that I guess makes sense in the case of a non-blocking fd,
> but what about the case of a blocking file descriptor? Both
> userfaultfd and eventfd can seemingly be stuck in a read syscall with
> no way to break them out when the userfaultfd/eventfd has no further
> utility. Here is an example:
> https://gist.github.com/bgaff/607302d86d99ac539efca307ce2dd679
If an application wants to terminate blocking calls it has to rely on
signal delivery or pthread_cancel to end it.
This is very complicated so it is generally better to use poll and non
blocking.
Jason
Powered by blists - more mailing lists