Re: [RFC] drm/vgem: Don't use get_page in fault handler.

2020-07-07 Thread Christian König
Am 07.07.20 um 14:05 schrieb Thomas Hellström (Intel): On 7/7/20 1:07 PM, Chris Wilson wrote: Quoting Christian König (2020-07-07 11:58:26) Am 07.07.20 um 10:59 schrieb Daniel Vetter: On Tue, Jul 7, 2020 at 9:27 AM Lepton Wu wrote: For pages which are allocated in ttm with transparent huge

Re: [RFC] drm/vgem: Don't use get_page in fault handler.

2020-07-07 Thread Chris Wilson
Quoting Thomas Hellström (Intel) (2020-07-07 13:05:31) > > On 7/7/20 1:07 PM, Chris Wilson wrote: > > Quoting Christian König (2020-07-07 11:58:26) > >> Am 07.07.20 um 10:59 schrieb Daniel Vetter: > >>> On Tue, Jul 7, 2020 at 9:27 AM Lepton Wu wrote: > For pages which are allocated in ttm wi

Re: [RFC] drm/vgem: Don't use get_page in fault handler.

2020-07-07 Thread Intel
On 7/7/20 1:07 PM, Chris Wilson wrote: Quoting Christian König (2020-07-07 11:58:26) Am 07.07.20 um 10:59 schrieb Daniel Vetter: On Tue, Jul 7, 2020 at 9:27 AM Lepton Wu wrote: For pages which are allocated in ttm with transparent huge pages, tail pages have zero as reference count. The curr

Re: [RFC] drm/vgem: Don't use get_page in fault handler.

2020-07-07 Thread Chris Wilson
Quoting Christian König (2020-07-07 11:58:26) > Am 07.07.20 um 10:59 schrieb Daniel Vetter: > > On Tue, Jul 7, 2020 at 9:27 AM Lepton Wu wrote: > >> For pages which are allocated in ttm with transparent huge pages, > >> tail pages have zero as reference count. The current vgem code use > >> get_pa

Re: [RFC] drm/vgem: Don't use get_page in fault handler.

2020-07-07 Thread Christian König
Am 07.07.20 um 10:59 schrieb Daniel Vetter: On Tue, Jul 7, 2020 at 9:27 AM Lepton Wu wrote: For pages which are allocated in ttm with transparent huge pages, tail pages have zero as reference count. The current vgem code use get_page on them and it will trigger BUG when release_pages get called

Re: [RFC] drm/vgem: Don't use get_page in fault handler.

2020-07-07 Thread Daniel Vetter
On Tue, Jul 7, 2020 at 9:27 AM Lepton Wu wrote: > > For pages which are allocated in ttm with transparent huge pages, > tail pages have zero as reference count. The current vgem code use > get_page on them and it will trigger BUG when release_pages get called > on those pages later. > > Here I att

Re: [RFC] drm/vgem: Don't use get_page in fault handler.

2020-07-07 Thread Chris Wilson
Quoting Lepton Wu (2020-07-07 05:21:00) > For pages which are allocated in ttm with transparent huge pages, > tail pages have zero as reference count. The current vgem code use > get_page on them and it will trigger BUG when release_pages get called > on those pages later. > > Here I attach the mi

[RFC] drm/vgem: Don't use get_page in fault handler.

2020-07-07 Thread Lepton Wu
For pages which are allocated in ttm with transparent huge pages, tail pages have zero as reference count. The current vgem code use get_page on them and it will trigger BUG when release_pages get called on those pages later. Here I attach the minimal code to trigger this bug on a qemu VM which en