Re: [PATCH v2.1 04/26] mm: allow VM_FAULT_RETRY for multiple times

2019-02-24 Thread Peter Xu
On Fri, Feb 22, 2019 at 10:11:58AM -0500, Jerome Glisse wrote: > On Fri, Feb 22, 2019 at 12:25:44PM +0800, Peter Xu wrote: > > On Thu, Feb 21, 2019 at 10:53:11AM -0500, Jerome Glisse wrote: > > > On Thu, Feb 21, 2019 at 04:56:56PM +0800, Peter Xu wrote: > > > > The idea comes from a discussion betw

Re: [PATCH v2.1 04/26] mm: allow VM_FAULT_RETRY for multiple times

2019-02-22 Thread Jerome Glisse
On Fri, Feb 22, 2019 at 12:25:44PM +0800, Peter Xu wrote: > On Thu, Feb 21, 2019 at 10:53:11AM -0500, Jerome Glisse wrote: > > On Thu, Feb 21, 2019 at 04:56:56PM +0800, Peter Xu wrote: > > > The idea comes from a discussion between Linus and Andrea [1]. [...] > > > diff --git a/arch/x86/mm/fault.

Re: [PATCH v2.1 04/26] mm: allow VM_FAULT_RETRY for multiple times

2019-02-21 Thread Peter Xu
On Thu, Feb 21, 2019 at 10:53:11AM -0500, Jerome Glisse wrote: > On Thu, Feb 21, 2019 at 04:56:56PM +0800, Peter Xu wrote: > > The idea comes from a discussion between Linus and Andrea [1]. > > > > Before this patch we only allow a page fault to retry once. We > > achieved this by clearing the FA

Re: [PATCH v2.1 04/26] mm: allow VM_FAULT_RETRY for multiple times

2019-02-21 Thread Jerome Glisse
On Thu, Feb 21, 2019 at 04:56:56PM +0800, Peter Xu wrote: > The idea comes from a discussion between Linus and Andrea [1]. > > Before this patch we only allow a page fault to retry once. We > achieved this by clearing the FAULT_FLAG_ALLOW_RETRY flag when doing > handle_mm_fault() the second time.

[PATCH v2.1 04/26] mm: allow VM_FAULT_RETRY for multiple times

2019-02-21 Thread Peter Xu
The idea comes from a discussion between Linus and Andrea [1]. Before this patch we only allow a page fault to retry once. We achieved this by clearing the FAULT_FLAG_ALLOW_RETRY flag when doing handle_mm_fault() the second time. This was majorly used to avoid unexpected starvation of the system