Re: [Linaro-mm-sig] [PATCH 1/2] mm: replace BUG_ON in vm_insert_page with a return of an error

2021-02-04 Thread Suren Baghdasaryan
On Thu, Feb 4, 2021 at 7:55 AM Alex Deucher wrote: > > On Thu, Feb 4, 2021 at 3:16 AM Christian König > wrote: > > > > Am 03.02.21 um 22:41 schrieb Suren Baghdasaryan: > > > [SNIP] > > >>> How many semi-unrelated buffer accounting schemes does google come up > > >>> with? > > >>> > > >>> We're

Re: [Linaro-mm-sig] [PATCH 1/2] mm: replace BUG_ON in vm_insert_page with a return of an error

2021-02-04 Thread Alex Deucher
On Thu, Feb 4, 2021 at 3:16 AM Christian König wrote: > > Am 03.02.21 um 22:41 schrieb Suren Baghdasaryan: > > [SNIP] > >>> How many semi-unrelated buffer accounting schemes does google come up > >>> with? > >>> > >>> We're at three with this one. > >>> > >>> And also we _cannot_ required that

Re: [Linaro-mm-sig] [PATCH 1/2] mm: replace BUG_ON in vm_insert_page with a return of an error

2021-02-04 Thread Daniel Vetter
On Thu, Feb 04, 2021 at 09:16:32AM +0100, Christian König wrote: > Am 03.02.21 um 22:41 schrieb Suren Baghdasaryan: > > [SNIP] > > > > How many semi-unrelated buffer accounting schemes does google come up > > > > with? > > > > > > > > We're at three with this one. > > > > > > > > And also we

Re: [Linaro-mm-sig] [PATCH 1/2] mm: replace BUG_ON in vm_insert_page with a return of an error

2021-02-04 Thread Christian König
Am 03.02.21 um 22:41 schrieb Suren Baghdasaryan: [SNIP] How many semi-unrelated buffer accounting schemes does google come up with? We're at three with this one. And also we _cannot_ required that all dma-bufs are backed by struct page, so requiring struct page to make this work is a no-go.

Re: [Linaro-mm-sig] [PATCH 1/2] mm: replace BUG_ON in vm_insert_page with a return of an error

2021-02-03 Thread Christian König
Am 03.02.21 um 21:20 schrieb Suren Baghdasaryan: [SNIP] If there is a reason to set this flag other than historical use of carveout memory then we wanted to catch such cases and fix the drivers that moved to using dmabuf heaps. However maybe there are other reasons and if so I would be very

Re: [Linaro-mm-sig] [PATCH 1/2] mm: replace BUG_ON in vm_insert_page with a return of an error

2021-02-03 Thread Suren Baghdasaryan
On Wed, Feb 3, 2021 at 1:25 PM Daniel Vetter wrote: > > On Wed, Feb 3, 2021 at 9:29 PM Daniel Vetter wrote: > > > > On Wed, Feb 3, 2021 at 9:20 PM Suren Baghdasaryan wrote: > > > > > > On Wed, Feb 3, 2021 at 12:52 AM Daniel Vetter > > > wrote: > > > > > > > > On Wed, Feb 3, 2021 at 2:57 AM

Re: [Linaro-mm-sig] [PATCH 1/2] mm: replace BUG_ON in vm_insert_page with a return of an error

2021-02-03 Thread Daniel Vetter
On Wed, Feb 3, 2021 at 9:29 PM Daniel Vetter wrote: > > On Wed, Feb 3, 2021 at 9:20 PM Suren Baghdasaryan wrote: > > > > On Wed, Feb 3, 2021 at 12:52 AM Daniel Vetter > > wrote: > > > > > > On Wed, Feb 3, 2021 at 2:57 AM Matthew Wilcox wrote: > > > > > > > > On Tue, Feb 02, 2021 at 04:31:33PM

Re: [Linaro-mm-sig] [PATCH 1/2] mm: replace BUG_ON in vm_insert_page with a return of an error

2021-02-03 Thread Daniel Vetter
On Wed, Feb 3, 2021 at 9:20 PM Suren Baghdasaryan wrote: > > On Wed, Feb 3, 2021 at 12:52 AM Daniel Vetter wrote: > > > > On Wed, Feb 3, 2021 at 2:57 AM Matthew Wilcox wrote: > > > > > > On Tue, Feb 02, 2021 at 04:31:33PM -0800, Suren Baghdasaryan wrote: > > > > Replace BUG_ON(vma->vm_flags &

Re: [Linaro-mm-sig] [PATCH 1/2] mm: replace BUG_ON in vm_insert_page with a return of an error

2021-02-03 Thread Suren Baghdasaryan
On Wed, Feb 3, 2021 at 12:52 AM Daniel Vetter wrote: > > On Wed, Feb 3, 2021 at 2:57 AM Matthew Wilcox wrote: > > > > On Tue, Feb 02, 2021 at 04:31:33PM -0800, Suren Baghdasaryan wrote: > > > Replace BUG_ON(vma->vm_flags & VM_PFNMAP) in vm_insert_page with > > > WARN_ON_ONCE and returning an

Re: [Linaro-mm-sig] [PATCH 1/2] mm: replace BUG_ON in vm_insert_page with a return of an error

2021-02-03 Thread Daniel Vetter
On Wed, Feb 3, 2021 at 2:57 AM Matthew Wilcox wrote: > > On Tue, Feb 02, 2021 at 04:31:33PM -0800, Suren Baghdasaryan wrote: > > Replace BUG_ON(vma->vm_flags & VM_PFNMAP) in vm_insert_page with > > WARN_ON_ONCE and returning an error. This is to ensure users of the > > vm_insert_page that set