Re: [PATCH 2/2] mm: set PG_dma_pinned on get_user_pages*()

2018-07-02 Thread Michal Hocko
On Mon 02-07-18 09:02:27, Jan Kara wrote: > On Sun 01-07-18 23:10:04, John Hubbard wrote: [...] > > That is an interesting point. > > > > Holding off page writeback of this region does seem like it could cause > > problems under memory pressure. Maybe adjusting the watermarks so that we > > tell

Re: [PATCH 2/2] mm: set PG_dma_pinned on get_user_pages*()

2018-07-02 Thread Michal Hocko
On Mon 02-07-18 09:02:27, Jan Kara wrote: > On Sun 01-07-18 23:10:04, John Hubbard wrote: [...] > > That is an interesting point. > > > > Holding off page writeback of this region does seem like it could cause > > problems under memory pressure. Maybe adjusting the watermarks so that we > > tell

Re: [PATCH 2/2] mm: set PG_dma_pinned on get_user_pages*()

2018-07-02 Thread Michal Hocko
On Sun 01-07-18 23:41:21, John Hubbard wrote: > On 07/01/2018 11:34 PM, Leon Romanovsky wrote: > > On Sun, Jul 01, 2018 at 11:10:04PM -0700, John Hubbard wrote: [...] > >>> Sorry for naive question, but won't it create too much dirty pages > >>> so writeback will be called "non-stop" to rebalance

Re: [PATCH 2/2] mm: set PG_dma_pinned on get_user_pages*()

2018-07-02 Thread Michal Hocko
On Sun 01-07-18 23:41:21, John Hubbard wrote: > On 07/01/2018 11:34 PM, Leon Romanovsky wrote: > > On Sun, Jul 01, 2018 at 11:10:04PM -0700, John Hubbard wrote: [...] > >>> Sorry for naive question, but won't it create too much dirty pages > >>> so writeback will be called "non-stop" to rebalance

Re: [PATCH 2/2] mm: set PG_dma_pinned on get_user_pages*()

2018-07-02 Thread Jan Kara
On Sun 01-07-18 23:10:04, John Hubbard wrote: > On 07/01/2018 10:52 PM, Leon Romanovsky wrote: > > On Thu, Jun 28, 2018 at 11:17:43AM +0200, Jan Kara wrote: > >> On Wed 27-06-18 19:42:01, John Hubbard wrote: > >>> On 06/27/2018 10:02 AM, Jan Kara wrote: > On Wed 27-06-18 08:57:18, Jason

Re: [PATCH 2/2] mm: set PG_dma_pinned on get_user_pages*()

2018-07-02 Thread Jan Kara
On Sun 01-07-18 23:10:04, John Hubbard wrote: > On 07/01/2018 10:52 PM, Leon Romanovsky wrote: > > On Thu, Jun 28, 2018 at 11:17:43AM +0200, Jan Kara wrote: > >> On Wed 27-06-18 19:42:01, John Hubbard wrote: > >>> On 06/27/2018 10:02 AM, Jan Kara wrote: > On Wed 27-06-18 08:57:18, Jason

Re: [PATCH 2/2] mm: set PG_dma_pinned on get_user_pages*()

2018-07-02 Thread Jan Kara
On Mon 02-07-18 08:52:51, Leon Romanovsky wrote: > On Thu, Jun 28, 2018 at 11:17:43AM +0200, Jan Kara wrote: > > On Wed 27-06-18 19:42:01, John Hubbard wrote: > > > On 06/27/2018 10:02 AM, Jan Kara wrote: > > > > On Wed 27-06-18 08:57:18, Jason Gunthorpe wrote: > > > >> On Wed, Jun 27, 2018 at

Re: [PATCH 2/2] mm: set PG_dma_pinned on get_user_pages*()

2018-07-02 Thread Jan Kara
On Mon 02-07-18 08:52:51, Leon Romanovsky wrote: > On Thu, Jun 28, 2018 at 11:17:43AM +0200, Jan Kara wrote: > > On Wed 27-06-18 19:42:01, John Hubbard wrote: > > > On 06/27/2018 10:02 AM, Jan Kara wrote: > > > > On Wed 27-06-18 08:57:18, Jason Gunthorpe wrote: > > > >> On Wed, Jun 27, 2018 at

Re: [PATCH 2/2] mm: set PG_dma_pinned on get_user_pages*()

2018-07-02 Thread John Hubbard
On 07/01/2018 11:34 PM, Leon Romanovsky wrote: > On Sun, Jul 01, 2018 at 11:10:04PM -0700, John Hubbard wrote: >> On 07/01/2018 10:52 PM, Leon Romanovsky wrote: >>> On Thu, Jun 28, 2018 at 11:17:43AM +0200, Jan Kara wrote: On Wed 27-06-18 19:42:01, John Hubbard wrote: > On 06/27/2018

Re: [PATCH 2/2] mm: set PG_dma_pinned on get_user_pages*()

2018-07-02 Thread John Hubbard
On 07/01/2018 11:34 PM, Leon Romanovsky wrote: > On Sun, Jul 01, 2018 at 11:10:04PM -0700, John Hubbard wrote: >> On 07/01/2018 10:52 PM, Leon Romanovsky wrote: >>> On Thu, Jun 28, 2018 at 11:17:43AM +0200, Jan Kara wrote: On Wed 27-06-18 19:42:01, John Hubbard wrote: > On 06/27/2018

Re: [PATCH 2/2] mm: set PG_dma_pinned on get_user_pages*()

2018-07-02 Thread Leon Romanovsky
On Sun, Jul 01, 2018 at 11:10:04PM -0700, John Hubbard wrote: > On 07/01/2018 10:52 PM, Leon Romanovsky wrote: > > On Thu, Jun 28, 2018 at 11:17:43AM +0200, Jan Kara wrote: > >> On Wed 27-06-18 19:42:01, John Hubbard wrote: > >>> On 06/27/2018 10:02 AM, Jan Kara wrote: > On Wed 27-06-18

Re: [PATCH 2/2] mm: set PG_dma_pinned on get_user_pages*()

2018-07-02 Thread Leon Romanovsky
On Sun, Jul 01, 2018 at 11:10:04PM -0700, John Hubbard wrote: > On 07/01/2018 10:52 PM, Leon Romanovsky wrote: > > On Thu, Jun 28, 2018 at 11:17:43AM +0200, Jan Kara wrote: > >> On Wed 27-06-18 19:42:01, John Hubbard wrote: > >>> On 06/27/2018 10:02 AM, Jan Kara wrote: > On Wed 27-06-18

Re: [PATCH 2/2] mm: set PG_dma_pinned on get_user_pages*()

2018-07-02 Thread John Hubbard
On 07/01/2018 10:52 PM, Leon Romanovsky wrote: > On Thu, Jun 28, 2018 at 11:17:43AM +0200, Jan Kara wrote: >> On Wed 27-06-18 19:42:01, John Hubbard wrote: >>> On 06/27/2018 10:02 AM, Jan Kara wrote: On Wed 27-06-18 08:57:18, Jason Gunthorpe wrote: > On Wed, Jun 27, 2018 at 02:42:55PM

Re: [PATCH 2/2] mm: set PG_dma_pinned on get_user_pages*()

2018-07-02 Thread John Hubbard
On 07/01/2018 10:52 PM, Leon Romanovsky wrote: > On Thu, Jun 28, 2018 at 11:17:43AM +0200, Jan Kara wrote: >> On Wed 27-06-18 19:42:01, John Hubbard wrote: >>> On 06/27/2018 10:02 AM, Jan Kara wrote: On Wed 27-06-18 08:57:18, Jason Gunthorpe wrote: > On Wed, Jun 27, 2018 at 02:42:55PM

Re: [PATCH 2/2] mm: set PG_dma_pinned on get_user_pages*()

2018-07-01 Thread Leon Romanovsky
On Thu, Jun 28, 2018 at 11:17:43AM +0200, Jan Kara wrote: > On Wed 27-06-18 19:42:01, John Hubbard wrote: > > On 06/27/2018 10:02 AM, Jan Kara wrote: > > > On Wed 27-06-18 08:57:18, Jason Gunthorpe wrote: > > >> On Wed, Jun 27, 2018 at 02:42:55PM +0200, Jan Kara wrote: > > >>> On Wed 27-06-18

Re: [PATCH 2/2] mm: set PG_dma_pinned on get_user_pages*()

2018-07-01 Thread Leon Romanovsky
On Thu, Jun 28, 2018 at 11:17:43AM +0200, Jan Kara wrote: > On Wed 27-06-18 19:42:01, John Hubbard wrote: > > On 06/27/2018 10:02 AM, Jan Kara wrote: > > > On Wed 27-06-18 08:57:18, Jason Gunthorpe wrote: > > >> On Wed, Jun 27, 2018 at 02:42:55PM +0200, Jan Kara wrote: > > >>> On Wed 27-06-18

Re: [PATCH 2/2] mm: set PG_dma_pinned on get_user_pages*()

2018-06-28 Thread Jan Kara
On Wed 27-06-18 19:42:01, John Hubbard wrote: > On 06/27/2018 10:02 AM, Jan Kara wrote: > > On Wed 27-06-18 08:57:18, Jason Gunthorpe wrote: > >> On Wed, Jun 27, 2018 at 02:42:55PM +0200, Jan Kara wrote: > >>> On Wed 27-06-18 13:59:27, Michal Hocko wrote: > On Wed 27-06-18 13:53:49, Jan Kara

Re: [PATCH 2/2] mm: set PG_dma_pinned on get_user_pages*()

2018-06-28 Thread Jan Kara
On Wed 27-06-18 19:42:01, John Hubbard wrote: > On 06/27/2018 10:02 AM, Jan Kara wrote: > > On Wed 27-06-18 08:57:18, Jason Gunthorpe wrote: > >> On Wed, Jun 27, 2018 at 02:42:55PM +0200, Jan Kara wrote: > >>> On Wed 27-06-18 13:59:27, Michal Hocko wrote: > On Wed 27-06-18 13:53:49, Jan Kara

Re: [PATCH 2/2] mm: set PG_dma_pinned on get_user_pages*()

2018-06-27 Thread John Hubbard
On 06/27/2018 10:02 AM, Jan Kara wrote: > On Wed 27-06-18 08:57:18, Jason Gunthorpe wrote: >> On Wed, Jun 27, 2018 at 02:42:55PM +0200, Jan Kara wrote: >>> On Wed 27-06-18 13:59:27, Michal Hocko wrote: On Wed 27-06-18 13:53:49, Jan Kara wrote: > On Wed 27-06-18 13:32:21, Michal Hocko

Re: [PATCH 2/2] mm: set PG_dma_pinned on get_user_pages*()

2018-06-27 Thread John Hubbard
On 06/27/2018 10:02 AM, Jan Kara wrote: > On Wed 27-06-18 08:57:18, Jason Gunthorpe wrote: >> On Wed, Jun 27, 2018 at 02:42:55PM +0200, Jan Kara wrote: >>> On Wed 27-06-18 13:59:27, Michal Hocko wrote: On Wed 27-06-18 13:53:49, Jan Kara wrote: > On Wed 27-06-18 13:32:21, Michal Hocko

Re: [PATCH 2/2] mm: set PG_dma_pinned on get_user_pages*()

2018-06-27 Thread Jan Kara
On Wed 27-06-18 08:57:18, Jason Gunthorpe wrote: > On Wed, Jun 27, 2018 at 02:42:55PM +0200, Jan Kara wrote: > > On Wed 27-06-18 13:59:27, Michal Hocko wrote: > > > On Wed 27-06-18 13:53:49, Jan Kara wrote: > > > > On Wed 27-06-18 13:32:21, Michal Hocko wrote: > > > [...] > > > > > Appart from

Re: [PATCH 2/2] mm: set PG_dma_pinned on get_user_pages*()

2018-06-27 Thread Jan Kara
On Wed 27-06-18 08:57:18, Jason Gunthorpe wrote: > On Wed, Jun 27, 2018 at 02:42:55PM +0200, Jan Kara wrote: > > On Wed 27-06-18 13:59:27, Michal Hocko wrote: > > > On Wed 27-06-18 13:53:49, Jan Kara wrote: > > > > On Wed 27-06-18 13:32:21, Michal Hocko wrote: > > > [...] > > > > > Appart from

Re: [PATCH 2/2] mm: set PG_dma_pinned on get_user_pages*()

2018-06-27 Thread Jason Gunthorpe
On Wed, Jun 27, 2018 at 02:42:55PM +0200, Jan Kara wrote: > On Wed 27-06-18 13:59:27, Michal Hocko wrote: > > On Wed 27-06-18 13:53:49, Jan Kara wrote: > > > On Wed 27-06-18 13:32:21, Michal Hocko wrote: > > [...] > > > > Appart from that, do we really care about 32b here? Big DIO, IB users > > >

Re: [PATCH 2/2] mm: set PG_dma_pinned on get_user_pages*()

2018-06-27 Thread Jason Gunthorpe
On Wed, Jun 27, 2018 at 02:42:55PM +0200, Jan Kara wrote: > On Wed 27-06-18 13:59:27, Michal Hocko wrote: > > On Wed 27-06-18 13:53:49, Jan Kara wrote: > > > On Wed 27-06-18 13:32:21, Michal Hocko wrote: > > [...] > > > > Appart from that, do we really care about 32b here? Big DIO, IB users > > >

Re: [PATCH 2/2] mm: set PG_dma_pinned on get_user_pages*()

2018-06-27 Thread Jan Kara
On Wed 27-06-18 13:59:27, Michal Hocko wrote: > On Wed 27-06-18 13:53:49, Jan Kara wrote: > > On Wed 27-06-18 13:32:21, Michal Hocko wrote: > [...] > > > Appart from that, do we really care about 32b here? Big DIO, IB users > > > seem to be 64b only AFAIU. > > > > IMO it is a bad habit to leave

Re: [PATCH 2/2] mm: set PG_dma_pinned on get_user_pages*()

2018-06-27 Thread Jan Kara
On Wed 27-06-18 13:59:27, Michal Hocko wrote: > On Wed 27-06-18 13:53:49, Jan Kara wrote: > > On Wed 27-06-18 13:32:21, Michal Hocko wrote: > [...] > > > Appart from that, do we really care about 32b here? Big DIO, IB users > > > seem to be 64b only AFAIU. > > > > IMO it is a bad habit to leave

Re: [PATCH 2/2] mm: set PG_dma_pinned on get_user_pages*()

2018-06-27 Thread Michal Hocko
On Wed 27-06-18 13:53:49, Jan Kara wrote: > On Wed 27-06-18 13:32:21, Michal Hocko wrote: [...] > > Appart from that, do we really care about 32b here? Big DIO, IB users > > seem to be 64b only AFAIU. > > IMO it is a bad habit to leave unpriviledged-user-triggerable oops in the > kernel even for

Re: [PATCH 2/2] mm: set PG_dma_pinned on get_user_pages*()

2018-06-27 Thread Michal Hocko
On Wed 27-06-18 13:53:49, Jan Kara wrote: > On Wed 27-06-18 13:32:21, Michal Hocko wrote: [...] > > Appart from that, do we really care about 32b here? Big DIO, IB users > > seem to be 64b only AFAIU. > > IMO it is a bad habit to leave unpriviledged-user-triggerable oops in the > kernel even for

Re: [PATCH 2/2] mm: set PG_dma_pinned on get_user_pages*()

2018-06-27 Thread Jan Kara
On Wed 27-06-18 13:32:21, Michal Hocko wrote: > On Tue 26-06-18 18:48:25, Jan Kara wrote: > > On Tue 26-06-18 15:47:57, Michal Hocko wrote: > > > On Mon 18-06-18 12:21:46, Dan Williams wrote: > > > [...] > > > > I do think we should explore a page flag for pages that are "long > > > > term"

Re: [PATCH 2/2] mm: set PG_dma_pinned on get_user_pages*()

2018-06-27 Thread Jan Kara
On Wed 27-06-18 13:32:21, Michal Hocko wrote: > On Tue 26-06-18 18:48:25, Jan Kara wrote: > > On Tue 26-06-18 15:47:57, Michal Hocko wrote: > > > On Mon 18-06-18 12:21:46, Dan Williams wrote: > > > [...] > > > > I do think we should explore a page flag for pages that are "long > > > > term"

Re: [PATCH 2/2] mm: set PG_dma_pinned on get_user_pages*()

2018-06-27 Thread Michal Hocko
On Tue 26-06-18 18:48:25, Jan Kara wrote: > On Tue 26-06-18 15:47:57, Michal Hocko wrote: > > On Mon 18-06-18 12:21:46, Dan Williams wrote: > > [...] > > > I do think we should explore a page flag for pages that are "long > > > term" pinned. Michal asked for something along these lines at LSF / MM

Re: [PATCH 2/2] mm: set PG_dma_pinned on get_user_pages*()

2018-06-27 Thread Michal Hocko
On Tue 26-06-18 18:48:25, Jan Kara wrote: > On Tue 26-06-18 15:47:57, Michal Hocko wrote: > > On Mon 18-06-18 12:21:46, Dan Williams wrote: > > [...] > > > I do think we should explore a page flag for pages that are "long > > > term" pinned. Michal asked for something along these lines at LSF / MM

Re: [PATCH 2/2] mm: set PG_dma_pinned on get_user_pages*()

2018-06-26 Thread Jan Kara
On Tue 26-06-18 15:47:57, Michal Hocko wrote: > On Mon 18-06-18 12:21:46, Dan Williams wrote: > [...] > > I do think we should explore a page flag for pages that are "long > > term" pinned. Michal asked for something along these lines at LSF / MM > > so that the core-mm can give up on pages that

Re: [PATCH 2/2] mm: set PG_dma_pinned on get_user_pages*()

2018-06-26 Thread Jan Kara
On Tue 26-06-18 15:47:57, Michal Hocko wrote: > On Mon 18-06-18 12:21:46, Dan Williams wrote: > [...] > > I do think we should explore a page flag for pages that are "long > > term" pinned. Michal asked for something along these lines at LSF / MM > > so that the core-mm can give up on pages that

Re: [PATCH 2/2] mm: set PG_dma_pinned on get_user_pages*()

2018-06-26 Thread Michal Hocko
On Mon 18-06-18 12:21:46, Dan Williams wrote: [...] > I do think we should explore a page flag for pages that are "long > term" pinned. Michal asked for something along these lines at LSF / MM > so that the core-mm can give up on pages that the kernel has lost > lifetime control. Michal, did I

Re: [PATCH 2/2] mm: set PG_dma_pinned on get_user_pages*()

2018-06-26 Thread Michal Hocko
On Mon 18-06-18 12:21:46, Dan Williams wrote: [...] > I do think we should explore a page flag for pages that are "long > term" pinned. Michal asked for something along these lines at LSF / MM > so that the core-mm can give up on pages that the kernel has lost > lifetime control. Michal, did I

Re: [PATCH 2/2] mm: set PG_dma_pinned on get_user_pages*()

2018-06-26 Thread Jan Kara
On Mon 25-06-18 23:31:06, John Hubbard wrote: > On 06/25/2018 08:21 AM, Jan Kara wrote: > > On Thu 21-06-18 18:30:36, Jan Kara wrote: > > So I think the Matthew's idea of removing pinned pages from LRU is > > definitely worth trying to see how complex that would end up being. Did you > > get to

Re: [PATCH 2/2] mm: set PG_dma_pinned on get_user_pages*()

2018-06-26 Thread Jan Kara
On Mon 25-06-18 23:31:06, John Hubbard wrote: > On 06/25/2018 08:21 AM, Jan Kara wrote: > > On Thu 21-06-18 18:30:36, Jan Kara wrote: > > So I think the Matthew's idea of removing pinned pages from LRU is > > definitely worth trying to see how complex that would end up being. Did you > > get to

Re: [PATCH 2/2] mm: set PG_dma_pinned on get_user_pages*()

2018-06-26 Thread Jan Kara
On Mon 25-06-18 12:03:37, John Hubbard wrote: > On 06/25/2018 08:21 AM, Jan Kara wrote: > > On Thu 21-06-18 18:30:36, Jan Kara wrote: > >> On Wed 20-06-18 15:55:41, John Hubbard wrote: > >>> On 06/20/2018 05:08 AM, Jan Kara wrote: > On Tue 19-06-18 11:11:48, John Hubbard wrote: > > On

Re: [PATCH 2/2] mm: set PG_dma_pinned on get_user_pages*()

2018-06-26 Thread Jan Kara
On Mon 25-06-18 12:03:37, John Hubbard wrote: > On 06/25/2018 08:21 AM, Jan Kara wrote: > > On Thu 21-06-18 18:30:36, Jan Kara wrote: > >> On Wed 20-06-18 15:55:41, John Hubbard wrote: > >>> On 06/20/2018 05:08 AM, Jan Kara wrote: > On Tue 19-06-18 11:11:48, John Hubbard wrote: > > On

Re: [PATCH 2/2] mm: set PG_dma_pinned on get_user_pages*()

2018-06-26 Thread John Hubbard
On 06/25/2018 08:21 AM, Jan Kara wrote: > On Thu 21-06-18 18:30:36, Jan Kara wrote: >> On Wed 20-06-18 15:55:41, John Hubbard wrote: >>> On 06/20/2018 05:08 AM, Jan Kara wrote: On Tue 19-06-18 11:11:48, John Hubbard wrote: > On 06/19/2018 03:41 AM, Jan Kara wrote: >> On Tue 19-06-18

Re: [PATCH 2/2] mm: set PG_dma_pinned on get_user_pages*()

2018-06-26 Thread John Hubbard
On 06/25/2018 08:21 AM, Jan Kara wrote: > On Thu 21-06-18 18:30:36, Jan Kara wrote: >> On Wed 20-06-18 15:55:41, John Hubbard wrote: >>> On 06/20/2018 05:08 AM, Jan Kara wrote: On Tue 19-06-18 11:11:48, John Hubbard wrote: > On 06/19/2018 03:41 AM, Jan Kara wrote: >> On Tue 19-06-18

Re: [PATCH 2/2] mm: set PG_dma_pinned on get_user_pages*()

2018-06-25 Thread John Hubbard
On 06/25/2018 08:21 AM, Jan Kara wrote: > On Thu 21-06-18 18:30:36, Jan Kara wrote: >> On Wed 20-06-18 15:55:41, John Hubbard wrote: >>> On 06/20/2018 05:08 AM, Jan Kara wrote: On Tue 19-06-18 11:11:48, John Hubbard wrote: > On 06/19/2018 03:41 AM, Jan Kara wrote: >> On Tue 19-06-18

Re: [PATCH 2/2] mm: set PG_dma_pinned on get_user_pages*()

2018-06-25 Thread John Hubbard
On 06/25/2018 08:21 AM, Jan Kara wrote: > On Thu 21-06-18 18:30:36, Jan Kara wrote: >> On Wed 20-06-18 15:55:41, John Hubbard wrote: >>> On 06/20/2018 05:08 AM, Jan Kara wrote: On Tue 19-06-18 11:11:48, John Hubbard wrote: > On 06/19/2018 03:41 AM, Jan Kara wrote: >> On Tue 19-06-18

Re: [PATCH 2/2] mm: set PG_dma_pinned on get_user_pages*()

2018-06-25 Thread Jan Kara
On Thu 21-06-18 18:30:36, Jan Kara wrote: > On Wed 20-06-18 15:55:41, John Hubbard wrote: > > On 06/20/2018 05:08 AM, Jan Kara wrote: > > > On Tue 19-06-18 11:11:48, John Hubbard wrote: > > >> On 06/19/2018 03:41 AM, Jan Kara wrote: > > >>> On Tue 19-06-18 02:02:55, Matthew Wilcox wrote: > >

Re: [PATCH 2/2] mm: set PG_dma_pinned on get_user_pages*()

2018-06-25 Thread Jan Kara
On Thu 21-06-18 18:30:36, Jan Kara wrote: > On Wed 20-06-18 15:55:41, John Hubbard wrote: > > On 06/20/2018 05:08 AM, Jan Kara wrote: > > > On Tue 19-06-18 11:11:48, John Hubbard wrote: > > >> On 06/19/2018 03:41 AM, Jan Kara wrote: > > >>> On Tue 19-06-18 02:02:55, Matthew Wilcox wrote: > >

Re: [PATCH 2/2] mm: set PG_dma_pinned on get_user_pages*()

2018-06-21 Thread Jan Kara
On Wed 20-06-18 15:55:41, John Hubbard wrote: > On 06/20/2018 05:08 AM, Jan Kara wrote: > > On Tue 19-06-18 11:11:48, John Hubbard wrote: > >> On 06/19/2018 03:41 AM, Jan Kara wrote: > >>> On Tue 19-06-18 02:02:55, Matthew Wilcox wrote: > On Tue, Jun 19, 2018 at 10:29:49AM +0200, Jan Kara

Re: [PATCH 2/2] mm: set PG_dma_pinned on get_user_pages*()

2018-06-21 Thread Jan Kara
On Wed 20-06-18 15:55:41, John Hubbard wrote: > On 06/20/2018 05:08 AM, Jan Kara wrote: > > On Tue 19-06-18 11:11:48, John Hubbard wrote: > >> On 06/19/2018 03:41 AM, Jan Kara wrote: > >>> On Tue 19-06-18 02:02:55, Matthew Wilcox wrote: > On Tue, Jun 19, 2018 at 10:29:49AM +0200, Jan Kara

Re: [PATCH 2/2] mm: set PG_dma_pinned on get_user_pages*()

2018-06-20 Thread John Hubbard
On 06/20/2018 05:08 AM, Jan Kara wrote: > On Tue 19-06-18 11:11:48, John Hubbard wrote: >> On 06/19/2018 03:41 AM, Jan Kara wrote: >>> On Tue 19-06-18 02:02:55, Matthew Wilcox wrote: On Tue, Jun 19, 2018 at 10:29:49AM +0200, Jan Kara wrote: [...] >>> I'm also still pondering the idea of

Re: [PATCH 2/2] mm: set PG_dma_pinned on get_user_pages*()

2018-06-20 Thread John Hubbard
On 06/20/2018 05:08 AM, Jan Kara wrote: > On Tue 19-06-18 11:11:48, John Hubbard wrote: >> On 06/19/2018 03:41 AM, Jan Kara wrote: >>> On Tue 19-06-18 02:02:55, Matthew Wilcox wrote: On Tue, Jun 19, 2018 at 10:29:49AM +0200, Jan Kara wrote: [...] >>> I'm also still pondering the idea of

Re: [PATCH 2/2] mm: set PG_dma_pinned on get_user_pages*()

2018-06-20 Thread Jan Kara
On Tue 19-06-18 11:11:48, John Hubbard wrote: > On 06/19/2018 03:41 AM, Jan Kara wrote: > > On Tue 19-06-18 02:02:55, Matthew Wilcox wrote: > >> On Tue, Jun 19, 2018 at 10:29:49AM +0200, Jan Kara wrote: > >>> And for record, the problem with page cache pages is not only that > >>> try_to_unmap()

Re: [PATCH 2/2] mm: set PG_dma_pinned on get_user_pages*()

2018-06-20 Thread Jan Kara
On Tue 19-06-18 11:11:48, John Hubbard wrote: > On 06/19/2018 03:41 AM, Jan Kara wrote: > > On Tue 19-06-18 02:02:55, Matthew Wilcox wrote: > >> On Tue, Jun 19, 2018 at 10:29:49AM +0200, Jan Kara wrote: > >>> And for record, the problem with page cache pages is not only that > >>> try_to_unmap()

Re: [PATCH 2/2] mm: set PG_dma_pinned on get_user_pages*()

2018-06-19 Thread John Hubbard
On 06/19/2018 06:57 PM, Dan Williams wrote: > On Tue, Jun 19, 2018 at 6:34 PM, John Hubbard wrote: >> On 06/19/2018 06:24 PM, Dan Williams wrote: >>> On Tue, Jun 19, 2018 at 11:11 AM, John Hubbard wrote: On 06/19/2018 03:41 AM, Jan Kara wrote: > On Tue 19-06-18 02:02:55, Matthew Wilcox

Re: [PATCH 2/2] mm: set PG_dma_pinned on get_user_pages*()

2018-06-19 Thread John Hubbard
On 06/19/2018 06:57 PM, Dan Williams wrote: > On Tue, Jun 19, 2018 at 6:34 PM, John Hubbard wrote: >> On 06/19/2018 06:24 PM, Dan Williams wrote: >>> On Tue, Jun 19, 2018 at 11:11 AM, John Hubbard wrote: On 06/19/2018 03:41 AM, Jan Kara wrote: > On Tue 19-06-18 02:02:55, Matthew Wilcox

Re: [PATCH 2/2] mm: set PG_dma_pinned on get_user_pages*()

2018-06-19 Thread Dan Williams
On Tue, Jun 19, 2018 at 6:34 PM, John Hubbard wrote: > On 06/19/2018 06:24 PM, Dan Williams wrote: >> On Tue, Jun 19, 2018 at 11:11 AM, John Hubbard wrote: >>> On 06/19/2018 03:41 AM, Jan Kara wrote: On Tue 19-06-18 02:02:55, Matthew Wilcox wrote: > On Tue, Jun 19, 2018 at 10:29:49AM

Re: [PATCH 2/2] mm: set PG_dma_pinned on get_user_pages*()

2018-06-19 Thread Dan Williams
On Tue, Jun 19, 2018 at 6:34 PM, John Hubbard wrote: > On 06/19/2018 06:24 PM, Dan Williams wrote: >> On Tue, Jun 19, 2018 at 11:11 AM, John Hubbard wrote: >>> On 06/19/2018 03:41 AM, Jan Kara wrote: On Tue 19-06-18 02:02:55, Matthew Wilcox wrote: > On Tue, Jun 19, 2018 at 10:29:49AM

Re: [PATCH 2/2] mm: set PG_dma_pinned on get_user_pages*()

2018-06-19 Thread John Hubbard
On 06/19/2018 06:24 PM, Dan Williams wrote: > On Tue, Jun 19, 2018 at 11:11 AM, John Hubbard wrote: >> On 06/19/2018 03:41 AM, Jan Kara wrote: >>> On Tue 19-06-18 02:02:55, Matthew Wilcox wrote: On Tue, Jun 19, 2018 at 10:29:49AM +0200, Jan Kara wrote: > [..] >>> And then there's the aspect

Re: [PATCH 2/2] mm: set PG_dma_pinned on get_user_pages*()

2018-06-19 Thread John Hubbard
On 06/19/2018 06:24 PM, Dan Williams wrote: > On Tue, Jun 19, 2018 at 11:11 AM, John Hubbard wrote: >> On 06/19/2018 03:41 AM, Jan Kara wrote: >>> On Tue 19-06-18 02:02:55, Matthew Wilcox wrote: On Tue, Jun 19, 2018 at 10:29:49AM +0200, Jan Kara wrote: > [..] >>> And then there's the aspect

Re: [PATCH 2/2] mm: set PG_dma_pinned on get_user_pages*()

2018-06-19 Thread Dan Williams
On Tue, Jun 19, 2018 at 11:11 AM, John Hubbard wrote: > On 06/19/2018 03:41 AM, Jan Kara wrote: >> On Tue 19-06-18 02:02:55, Matthew Wilcox wrote: >>> On Tue, Jun 19, 2018 at 10:29:49AM +0200, Jan Kara wrote: [..] >> And then there's the aspect that both these approaches are a bit too >>

Re: [PATCH 2/2] mm: set PG_dma_pinned on get_user_pages*()

2018-06-19 Thread Dan Williams
On Tue, Jun 19, 2018 at 11:11 AM, John Hubbard wrote: > On 06/19/2018 03:41 AM, Jan Kara wrote: >> On Tue 19-06-18 02:02:55, Matthew Wilcox wrote: >>> On Tue, Jun 19, 2018 at 10:29:49AM +0200, Jan Kara wrote: [..] >> And then there's the aspect that both these approaches are a bit too >>

Re: [PATCH 2/2] mm: set PG_dma_pinned on get_user_pages*()

2018-06-19 Thread John Hubbard
On 06/19/2018 03:41 AM, Jan Kara wrote: > On Tue 19-06-18 02:02:55, Matthew Wilcox wrote: >> On Tue, Jun 19, 2018 at 10:29:49AM +0200, Jan Kara wrote: >>> And for record, the problem with page cache pages is not only that >>> try_to_unmap() may unmap them. It is also that page_mkclean() can >>>

Re: [PATCH 2/2] mm: set PG_dma_pinned on get_user_pages*()

2018-06-19 Thread John Hubbard
On 06/19/2018 03:41 AM, Jan Kara wrote: > On Tue 19-06-18 02:02:55, Matthew Wilcox wrote: >> On Tue, Jun 19, 2018 at 10:29:49AM +0200, Jan Kara wrote: >>> And for record, the problem with page cache pages is not only that >>> try_to_unmap() may unmap them. It is also that page_mkclean() can >>>

Re: [PATCH 2/2] mm: set PG_dma_pinned on get_user_pages*()

2018-06-19 Thread Jan Kara
On Tue 19-06-18 02:02:55, Matthew Wilcox wrote: > On Tue, Jun 19, 2018 at 10:29:49AM +0200, Jan Kara wrote: > > And for record, the problem with page cache pages is not only that > > try_to_unmap() may unmap them. It is also that page_mkclean() can > > write-protect them. And once PTEs are

Re: [PATCH 2/2] mm: set PG_dma_pinned on get_user_pages*()

2018-06-19 Thread Jan Kara
On Tue 19-06-18 02:02:55, Matthew Wilcox wrote: > On Tue, Jun 19, 2018 at 10:29:49AM +0200, Jan Kara wrote: > > And for record, the problem with page cache pages is not only that > > try_to_unmap() may unmap them. It is also that page_mkclean() can > > write-protect them. And once PTEs are

Re: [PATCH 2/2] mm: set PG_dma_pinned on get_user_pages*()

2018-06-19 Thread Matthew Wilcox
On Tue, Jun 19, 2018 at 10:29:49AM +0200, Jan Kara wrote: > And for record, the problem with page cache pages is not only that > try_to_unmap() may unmap them. It is also that page_mkclean() can > write-protect them. And once PTEs are write-protected filesystems may end > up doing bad things if

Re: [PATCH 2/2] mm: set PG_dma_pinned on get_user_pages*()

2018-06-19 Thread Matthew Wilcox
On Tue, Jun 19, 2018 at 10:29:49AM +0200, Jan Kara wrote: > And for record, the problem with page cache pages is not only that > try_to_unmap() may unmap them. It is also that page_mkclean() can > write-protect them. And once PTEs are write-protected filesystems may end > up doing bad things if

Re: [PATCH 2/2] mm: set PG_dma_pinned on get_user_pages*()

2018-06-19 Thread Jan Kara
On Mon 18-06-18 14:36:44, John Hubbard wrote: > On 06/18/2018 12:21 PM, Dan Williams wrote: > > On Mon, Jun 18, 2018 at 11:14 AM, John Hubbard wrote: > >> On 06/18/2018 10:56 AM, Dan Williams wrote: > >>> On Mon, Jun 18, 2018 at 10:50 AM, John Hubbard > >>> wrote: > On 06/18/2018 01:12 AM,

Re: [PATCH 2/2] mm: set PG_dma_pinned on get_user_pages*()

2018-06-19 Thread Jan Kara
On Mon 18-06-18 14:36:44, John Hubbard wrote: > On 06/18/2018 12:21 PM, Dan Williams wrote: > > On Mon, Jun 18, 2018 at 11:14 AM, John Hubbard wrote: > >> On 06/18/2018 10:56 AM, Dan Williams wrote: > >>> On Mon, Jun 18, 2018 at 10:50 AM, John Hubbard > >>> wrote: > On 06/18/2018 01:12 AM,

Re: [PATCH 2/2] mm: set PG_dma_pinned on get_user_pages*()

2018-06-19 Thread Leon Romanovsky
On Mon, Jun 18, 2018 at 10:11:13AM +0200, Christoph Hellwig wrote: > On Sun, Jun 17, 2018 at 01:10:04PM -0700, Dan Williams wrote: > > I believe kernel behavior regression is a primary concern as now > > fallocate() and truncate() can randomly fail where they didn't before. > > Fail or block

Re: [PATCH 2/2] mm: set PG_dma_pinned on get_user_pages*()

2018-06-19 Thread Leon Romanovsky
On Mon, Jun 18, 2018 at 10:11:13AM +0200, Christoph Hellwig wrote: > On Sun, Jun 17, 2018 at 01:10:04PM -0700, Dan Williams wrote: > > I believe kernel behavior regression is a primary concern as now > > fallocate() and truncate() can randomly fail where they didn't before. > > Fail or block

Re: [PATCH 2/2] mm: set PG_dma_pinned on get_user_pages*()

2018-06-18 Thread John Hubbard
On 06/18/2018 12:21 PM, Dan Williams wrote: > On Mon, Jun 18, 2018 at 11:14 AM, John Hubbard wrote: >> On 06/18/2018 10:56 AM, Dan Williams wrote: >>> On Mon, Jun 18, 2018 at 10:50 AM, John Hubbard wrote: On 06/18/2018 01:12 AM, Christoph Hellwig wrote: > On Sun, Jun 17, 2018 at

Re: [PATCH 2/2] mm: set PG_dma_pinned on get_user_pages*()

2018-06-18 Thread John Hubbard
On 06/18/2018 12:21 PM, Dan Williams wrote: > On Mon, Jun 18, 2018 at 11:14 AM, John Hubbard wrote: >> On 06/18/2018 10:56 AM, Dan Williams wrote: >>> On Mon, Jun 18, 2018 at 10:50 AM, John Hubbard wrote: On 06/18/2018 01:12 AM, Christoph Hellwig wrote: > On Sun, Jun 17, 2018 at

Re: [PATCH 2/2] mm: set PG_dma_pinned on get_user_pages*()

2018-06-18 Thread Dan Williams
On Mon, Jun 18, 2018 at 12:31 PM, Jason Gunthorpe wrote: > On Mon, Jun 18, 2018 at 12:21:46PM -0700, Dan Williams wrote: >> On Mon, Jun 18, 2018 at 11:14 AM, John Hubbard wrote: >> > On 06/18/2018 10:56 AM, Dan Williams wrote: >> >> On Mon, Jun 18, 2018 at 10:50 AM, John Hubbard >> >> wrote:

Re: [PATCH 2/2] mm: set PG_dma_pinned on get_user_pages*()

2018-06-18 Thread Dan Williams
On Mon, Jun 18, 2018 at 12:31 PM, Jason Gunthorpe wrote: > On Mon, Jun 18, 2018 at 12:21:46PM -0700, Dan Williams wrote: >> On Mon, Jun 18, 2018 at 11:14 AM, John Hubbard wrote: >> > On 06/18/2018 10:56 AM, Dan Williams wrote: >> >> On Mon, Jun 18, 2018 at 10:50 AM, John Hubbard >> >> wrote:

Re: [PATCH 2/2] mm: set PG_dma_pinned on get_user_pages*()

2018-06-18 Thread Jason Gunthorpe
On Mon, Jun 18, 2018 at 12:21:46PM -0700, Dan Williams wrote: > On Mon, Jun 18, 2018 at 11:14 AM, John Hubbard wrote: > > On 06/18/2018 10:56 AM, Dan Williams wrote: > >> On Mon, Jun 18, 2018 at 10:50 AM, John Hubbard wrote: > >>> On 06/18/2018 01:12 AM, Christoph Hellwig wrote: > On Sun,

Re: [PATCH 2/2] mm: set PG_dma_pinned on get_user_pages*()

2018-06-18 Thread Jason Gunthorpe
On Mon, Jun 18, 2018 at 12:21:46PM -0700, Dan Williams wrote: > On Mon, Jun 18, 2018 at 11:14 AM, John Hubbard wrote: > > On 06/18/2018 10:56 AM, Dan Williams wrote: > >> On Mon, Jun 18, 2018 at 10:50 AM, John Hubbard wrote: > >>> On 06/18/2018 01:12 AM, Christoph Hellwig wrote: > On Sun,

Re: [PATCH 2/2] mm: set PG_dma_pinned on get_user_pages*()

2018-06-18 Thread Dan Williams
On Mon, Jun 18, 2018 at 11:14 AM, John Hubbard wrote: > On 06/18/2018 10:56 AM, Dan Williams wrote: >> On Mon, Jun 18, 2018 at 10:50 AM, John Hubbard wrote: >>> On 06/18/2018 01:12 AM, Christoph Hellwig wrote: On Sun, Jun 17, 2018 at 01:28:18PM -0700, John Hubbard wrote: > Yes. However,

Re: [PATCH 2/2] mm: set PG_dma_pinned on get_user_pages*()

2018-06-18 Thread Dan Williams
On Mon, Jun 18, 2018 at 11:14 AM, John Hubbard wrote: > On 06/18/2018 10:56 AM, Dan Williams wrote: >> On Mon, Jun 18, 2018 at 10:50 AM, John Hubbard wrote: >>> On 06/18/2018 01:12 AM, Christoph Hellwig wrote: On Sun, Jun 17, 2018 at 01:28:18PM -0700, John Hubbard wrote: > Yes. However,

Re: [PATCH 2/2] mm: set PG_dma_pinned on get_user_pages*()

2018-06-18 Thread John Hubbard
On 06/18/2018 10:56 AM, Dan Williams wrote: > On Mon, Jun 18, 2018 at 10:50 AM, John Hubbard wrote: >> On 06/18/2018 01:12 AM, Christoph Hellwig wrote: >>> On Sun, Jun 17, 2018 at 01:28:18PM -0700, John Hubbard wrote: Yes. However, my thinking was: get_user_pages() can become a way to

Re: [PATCH 2/2] mm: set PG_dma_pinned on get_user_pages*()

2018-06-18 Thread John Hubbard
On 06/18/2018 10:56 AM, Dan Williams wrote: > On Mon, Jun 18, 2018 at 10:50 AM, John Hubbard wrote: >> On 06/18/2018 01:12 AM, Christoph Hellwig wrote: >>> On Sun, Jun 17, 2018 at 01:28:18PM -0700, John Hubbard wrote: Yes. However, my thinking was: get_user_pages() can become a way to

Re: [PATCH 2/2] mm: set PG_dma_pinned on get_user_pages*()

2018-06-18 Thread Dan Williams
On Mon, Jun 18, 2018 at 10:50 AM, John Hubbard wrote: > On 06/18/2018 01:12 AM, Christoph Hellwig wrote: >> On Sun, Jun 17, 2018 at 01:28:18PM -0700, John Hubbard wrote: >>> Yes. However, my thinking was: get_user_pages() can become a way to >>> indicate that >>> these pages are going to be

Re: [PATCH 2/2] mm: set PG_dma_pinned on get_user_pages*()

2018-06-18 Thread Dan Williams
On Mon, Jun 18, 2018 at 10:50 AM, John Hubbard wrote: > On 06/18/2018 01:12 AM, Christoph Hellwig wrote: >> On Sun, Jun 17, 2018 at 01:28:18PM -0700, John Hubbard wrote: >>> Yes. However, my thinking was: get_user_pages() can become a way to >>> indicate that >>> these pages are going to be

Re: [PATCH 2/2] mm: set PG_dma_pinned on get_user_pages*()

2018-06-18 Thread John Hubbard
On 06/18/2018 01:12 AM, Christoph Hellwig wrote: > On Sun, Jun 17, 2018 at 01:28:18PM -0700, John Hubbard wrote: >> Yes. However, my thinking was: get_user_pages() can become a way to indicate >> that >> these pages are going to be treated specially. In particular, the caller >> does not really

Re: [PATCH 2/2] mm: set PG_dma_pinned on get_user_pages*()

2018-06-18 Thread John Hubbard
On 06/18/2018 01:12 AM, Christoph Hellwig wrote: > On Sun, Jun 17, 2018 at 01:28:18PM -0700, John Hubbard wrote: >> Yes. However, my thinking was: get_user_pages() can become a way to indicate >> that >> these pages are going to be treated specially. In particular, the caller >> does not really

Re: [PATCH 2/2] mm: set PG_dma_pinned on get_user_pages*()

2018-06-18 Thread John Hubbard
Hi Christoph, Thanks for looking at this... On 06/18/2018 12:56 AM, Christoph Hellwig wrote: > On Sat, Jun 16, 2018 at 06:25:10PM -0700, john.hubb...@gmail.com wrote: >> From: John Hubbard >> >> This fixes a few problems that come up when using devices (NICs, GPUs, >> for example) that want to

Re: [PATCH 2/2] mm: set PG_dma_pinned on get_user_pages*()

2018-06-18 Thread John Hubbard
Hi Christoph, Thanks for looking at this... On 06/18/2018 12:56 AM, Christoph Hellwig wrote: > On Sat, Jun 16, 2018 at 06:25:10PM -0700, john.hubb...@gmail.com wrote: >> From: John Hubbard >> >> This fixes a few problems that come up when using devices (NICs, GPUs, >> for example) that want to

Re: [PATCH 2/2] mm: set PG_dma_pinned on get_user_pages*()

2018-06-18 Thread Christoph Hellwig
On Sun, Jun 17, 2018 at 01:28:18PM -0700, John Hubbard wrote: > Yes. However, my thinking was: get_user_pages() can become a way to indicate > that > these pages are going to be treated specially. In particular, the caller > does not really want or need to support certain file operations, while

Re: [PATCH 2/2] mm: set PG_dma_pinned on get_user_pages*()

2018-06-18 Thread Christoph Hellwig
On Sun, Jun 17, 2018 at 01:28:18PM -0700, John Hubbard wrote: > Yes. However, my thinking was: get_user_pages() can become a way to indicate > that > these pages are going to be treated specially. In particular, the caller > does not really want or need to support certain file operations, while

Re: [PATCH 2/2] mm: set PG_dma_pinned on get_user_pages*()

2018-06-18 Thread Christoph Hellwig
On Sun, Jun 17, 2018 at 01:10:04PM -0700, Dan Williams wrote: > I believe kernel behavior regression is a primary concern as now > fallocate() and truncate() can randomly fail where they didn't before. Fail or block forever due to actions of other unprivileged users. That is a complete no-go.

Re: [PATCH 2/2] mm: set PG_dma_pinned on get_user_pages*()

2018-06-18 Thread Christoph Hellwig
On Sun, Jun 17, 2018 at 01:10:04PM -0700, Dan Williams wrote: > I believe kernel behavior regression is a primary concern as now > fallocate() and truncate() can randomly fail where they didn't before. Fail or block forever due to actions of other unprivileged users. That is a complete no-go.

Re: [PATCH 2/2] mm: set PG_dma_pinned on get_user_pages*()

2018-06-18 Thread Christoph Hellwig
On Sat, Jun 16, 2018 at 06:25:10PM -0700, john.hubb...@gmail.com wrote: > From: John Hubbard > > This fixes a few problems that come up when using devices (NICs, GPUs, > for example) that want to have direct access to a chunk of system (CPU) > memory, so that they can DMA to/from that memory.

Re: [PATCH 2/2] mm: set PG_dma_pinned on get_user_pages*()

2018-06-18 Thread Christoph Hellwig
On Sat, Jun 16, 2018 at 06:25:10PM -0700, john.hubb...@gmail.com wrote: > From: John Hubbard > > This fixes a few problems that come up when using devices (NICs, GPUs, > for example) that want to have direct access to a chunk of system (CPU) > memory, so that they can DMA to/from that memory.

Re: [PATCH 2/2] mm: set PG_dma_pinned on get_user_pages*()

2018-06-17 Thread John Hubbard
On 06/17/2018 12:53 PM, Dan Williams wrote: > [..] >> diff --git a/mm/rmap.c b/mm/rmap.c >> index 6db729dc4c50..37576f0a4645 100644 >> --- a/mm/rmap.c >> +++ b/mm/rmap.c >> @@ -1360,6 +1360,8 @@ static bool try_to_unmap_one(struct page *page, struct >> vm_area_struct *vma, >>

Re: [PATCH 2/2] mm: set PG_dma_pinned on get_user_pages*()

2018-06-17 Thread John Hubbard
On 06/17/2018 12:53 PM, Dan Williams wrote: > [..] >> diff --git a/mm/rmap.c b/mm/rmap.c >> index 6db729dc4c50..37576f0a4645 100644 >> --- a/mm/rmap.c >> +++ b/mm/rmap.c >> @@ -1360,6 +1360,8 @@ static bool try_to_unmap_one(struct page *page, struct >> vm_area_struct *vma, >>

Re: [PATCH 2/2] mm: set PG_dma_pinned on get_user_pages*()

2018-06-17 Thread John Hubbard
On 06/17/2018 01:10 PM, Dan Williams wrote: > On Sun, Jun 17, 2018 at 1:04 PM, Jason Gunthorpe wrote: >> On Sun, Jun 17, 2018 at 12:53:04PM -0700, Dan Williams wrote: diff --git a/mm/rmap.c b/mm/rmap.c index 6db729dc4c50..37576f0a4645 100644 +++ b/mm/rmap.c @@ -1360,6 +1360,8

Re: [PATCH 2/2] mm: set PG_dma_pinned on get_user_pages*()

2018-06-17 Thread John Hubbard
On 06/17/2018 01:10 PM, Dan Williams wrote: > On Sun, Jun 17, 2018 at 1:04 PM, Jason Gunthorpe wrote: >> On Sun, Jun 17, 2018 at 12:53:04PM -0700, Dan Williams wrote: diff --git a/mm/rmap.c b/mm/rmap.c index 6db729dc4c50..37576f0a4645 100644 +++ b/mm/rmap.c @@ -1360,6 +1360,8

Re: [PATCH 2/2] mm: set PG_dma_pinned on get_user_pages*()

2018-06-17 Thread Dan Williams
On Sun, Jun 17, 2018 at 1:04 PM, Jason Gunthorpe wrote: > On Sun, Jun 17, 2018 at 12:53:04PM -0700, Dan Williams wrote: >> > diff --git a/mm/rmap.c b/mm/rmap.c >> > index 6db729dc4c50..37576f0a4645 100644 >> > +++ b/mm/rmap.c >> > @@ -1360,6 +1360,8 @@ static bool try_to_unmap_one(struct page

Re: [PATCH 2/2] mm: set PG_dma_pinned on get_user_pages*()

2018-06-17 Thread Dan Williams
On Sun, Jun 17, 2018 at 1:04 PM, Jason Gunthorpe wrote: > On Sun, Jun 17, 2018 at 12:53:04PM -0700, Dan Williams wrote: >> > diff --git a/mm/rmap.c b/mm/rmap.c >> > index 6db729dc4c50..37576f0a4645 100644 >> > +++ b/mm/rmap.c >> > @@ -1360,6 +1360,8 @@ static bool try_to_unmap_one(struct page

Re: [PATCH 2/2] mm: set PG_dma_pinned on get_user_pages*()

2018-06-17 Thread Jason Gunthorpe
On Sun, Jun 17, 2018 at 12:53:04PM -0700, Dan Williams wrote: > > diff --git a/mm/rmap.c b/mm/rmap.c > > index 6db729dc4c50..37576f0a4645 100644 > > +++ b/mm/rmap.c > > @@ -1360,6 +1360,8 @@ static bool try_to_unmap_one(struct page *page, > > struct vm_area_struct *vma, > >

Re: [PATCH 2/2] mm: set PG_dma_pinned on get_user_pages*()

2018-06-17 Thread Jason Gunthorpe
On Sun, Jun 17, 2018 at 12:53:04PM -0700, Dan Williams wrote: > > diff --git a/mm/rmap.c b/mm/rmap.c > > index 6db729dc4c50..37576f0a4645 100644 > > +++ b/mm/rmap.c > > @@ -1360,6 +1360,8 @@ static bool try_to_unmap_one(struct page *page, > > struct vm_area_struct *vma, > >

  1   2   >