Re: [PATCH 1/1] [RFC] drm/ttm: Don't init dma32_zone on 64-bit systems

2019-02-22 Thread Kuehling, Felix
On 2019-02-22 8:45 a.m., Thomas Hellstrom wrote: > On Fri, 2019-02-22 at 07:10 +, Koenig, Christian wrote: >> Am 21.02.19 um 22:02 schrieb Thomas Hellstrom: >>> Hi, >>> >>> On Thu, 2019-02-21 at 20:24 +, Kuehling, Felix wrote: On 2019-02-21 12:34 p.m., Thomas Hellstrom wrote: > On

Re: [PATCH 1/1] [RFC] drm/ttm: Don't init dma32_zone on 64-bit systems

2019-02-22 Thread Thomas Hellstrom
On Fri, 2019-02-22 at 07:10 +, Koenig, Christian wrote: > Am 21.02.19 um 22:02 schrieb Thomas Hellstrom: > > Hi, > > > > On Thu, 2019-02-21 at 20:24 +, Kuehling, Felix wrote: > > > On 2019-02-21 12:34 p.m., Thomas Hellstrom wrote: > > > > On Thu, 2019-02-21 at 16:57 +, Kuehling, Felix

Re: [PATCH 1/1] [RFC] drm/ttm: Don't init dma32_zone on 64-bit systems

2019-02-21 Thread Koenig, Christian
Am 21.02.19 um 22:02 schrieb Thomas Hellstrom: > Hi, > > On Thu, 2019-02-21 at 20:24 +, Kuehling, Felix wrote: >> On 2019-02-21 12:34 p.m., Thomas Hellstrom wrote: >>> On Thu, 2019-02-21 at 16:57 +, Kuehling, Felix wrote: On 2019-02-21 2:59 a.m., Koenig, Christian wrote: > On x86 w

Re: [PATCH 1/1] [RFC] drm/ttm: Don't init dma32_zone on 64-bit systems

2019-02-21 Thread Thomas Hellstrom
Hi, On Thu, 2019-02-21 at 20:24 +, Kuehling, Felix wrote: > On 2019-02-21 12:34 p.m., Thomas Hellstrom wrote: > > On Thu, 2019-02-21 at 16:57 +, Kuehling, Felix wrote: > > > On 2019-02-21 2:59 a.m., Koenig, Christian wrote: > > > > On x86 with HIGHMEM there is no dma32 zone. Why do we need

Re: [PATCH 1/1] [RFC] drm/ttm: Don't init dma32_zone on 64-bit systems

2019-02-21 Thread Kuehling, Felix
On 2019-02-21 12:34 p.m., Thomas Hellstrom wrote: > On Thu, 2019-02-21 at 16:57 +, Kuehling, Felix wrote: >> On 2019-02-21 2:59 a.m., Koenig, Christian wrote: >>> On x86 with HIGHMEM there is no dma32 zone. Why do we need one on > x86_64? Can we make x86_64 more like HIGHMEM instead? >

Re: [PATCH 1/1] [RFC] drm/ttm: Don't init dma32_zone on 64-bit systems

2019-02-21 Thread Thomas Hellstrom
On Thu, 2019-02-21 at 16:57 +, Kuehling, Felix wrote: > On 2019-02-21 2:59 a.m., Koenig, Christian wrote: > > On x86 with HIGHMEM there is no dma32 zone. Why do we need one on > > > > x86_64? Can we make x86_64 more like HIGHMEM instead? > > > > > > > > Regards, > > > > Felix > > > > > >

Re: [PATCH 1/1] [RFC] drm/ttm: Don't init dma32_zone on 64-bit systems

2019-02-21 Thread Kuehling, Felix
On 2019-02-21 2:59 a.m., Koenig, Christian wrote: > On x86 with HIGHMEM there is no dma32 zone. Why do we need one on >>> x86_64? Can we make x86_64 more like HIGHMEM instead? >>> >>> Regards, >>> Felix >>> >> IIRC with x86, the kernel zone is always smaller than any dma32 zone, >> so we'd al

Re: [PATCH 1/1] [RFC] drm/ttm: Don't init dma32_zone on 64-bit systems

2019-02-20 Thread Koenig, Christian
Am 21.02.19 um 07:47 schrieb Thomas Hellstrom: > On Wed, 2019-02-20 at 19:23 +, Kuehling, Felix wrote: >> On 2019-02-20 1:41 a.m., Thomas Hellstrom wrote: >>> On Tue, 2019-02-19 at 17:06 +, Kuehling, Felix wrote: On 2019-02-18 3:39 p.m., Thomas Hellstrom wrote: > On Mon, 2019-02-18

Re: [PATCH 1/1] [RFC] drm/ttm: Don't init dma32_zone on 64-bit systems

2019-02-20 Thread Thomas Hellstrom
On Wed, 2019-02-20 at 19:23 +, Kuehling, Felix wrote: > On 2019-02-20 1:41 a.m., Thomas Hellstrom wrote: > > On Tue, 2019-02-19 at 17:06 +, Kuehling, Felix wrote: > > > On 2019-02-18 3:39 p.m., Thomas Hellstrom wrote: > > > > On Mon, 2019-02-18 at 18:07 +0100, Christian König wrote: > > > >

Re: [PATCH 1/1] [RFC] drm/ttm: Don't init dma32_zone on 64-bit systems

2019-02-20 Thread Kuehling, Felix
On 2019-02-20 1:41 a.m., Thomas Hellstrom wrote: > On Tue, 2019-02-19 at 17:06 +, Kuehling, Felix wrote: >> On 2019-02-18 3:39 p.m., Thomas Hellstrom wrote: >>> On Mon, 2019-02-18 at 18:07 +0100, Christian König wrote: Am 18.02.19 um 10:47 schrieb Thomas Hellstrom: > On Mon, 2019-02-1

Re: [PATCH 1/1] [RFC] drm/ttm: Don't init dma32_zone on 64-bit systems

2019-02-20 Thread Thomas Hellstrom
On Wed, 2019-02-20 at 08:35 +, Koenig, Christian wrote: > Am 20.02.19 um 09:14 schrieb Thomas Hellstrom: > > On 2/20/19 9:07 AM, Christian König wrote: > > > Am 20.02.19 um 07:41 schrieb Thomas Hellstrom: > > > > On Tue, 2019-02-19 at 17:06 +, Kuehling, Felix wrote: > > > > > On 2019-02-18

Re: [PATCH 1/1] [RFC] drm/ttm: Don't init dma32_zone on 64-bit systems

2019-02-20 Thread Koenig, Christian
Am 20.02.19 um 09:14 schrieb Thomas Hellstrom: > On 2/20/19 9:07 AM, Christian König wrote: >> Am 20.02.19 um 07:41 schrieb Thomas Hellstrom: >>> On Tue, 2019-02-19 at 17:06 +, Kuehling, Felix wrote: On 2019-02-18 3:39 p.m., Thomas Hellstrom wrote: > On Mon, 2019-02-18 at 18:07 +0100,

Re: [PATCH 1/1] [RFC] drm/ttm: Don't init dma32_zone on 64-bit systems

2019-02-20 Thread Thomas Hellstrom
On 2/20/19 9:07 AM, Christian König wrote: Am 20.02.19 um 07:41 schrieb Thomas Hellstrom: On Tue, 2019-02-19 at 17:06 +, Kuehling, Felix wrote: On 2019-02-18 3:39 p.m., Thomas Hellstrom wrote: On Mon, 2019-02-18 at 18:07 +0100, Christian König wrote: Am 18.02.19 um 10:47 schrieb Thomas He

Re: [PATCH 1/1] [RFC] drm/ttm: Don't init dma32_zone on 64-bit systems

2019-02-20 Thread Christian König
Am 20.02.19 um 07:41 schrieb Thomas Hellstrom: On Tue, 2019-02-19 at 17:06 +, Kuehling, Felix wrote: On 2019-02-18 3:39 p.m., Thomas Hellstrom wrote: On Mon, 2019-02-18 at 18:07 +0100, Christian König wrote: Am 18.02.19 um 10:47 schrieb Thomas Hellstrom: On Mon, 2019-02-18 at 09:20 +,

Re: [PATCH 1/1] [RFC] drm/ttm: Don't init dma32_zone on 64-bit systems

2019-02-19 Thread Thomas Hellstrom
On Tue, 2019-02-19 at 17:06 +, Kuehling, Felix wrote: > On 2019-02-18 3:39 p.m., Thomas Hellstrom wrote: > > On Mon, 2019-02-18 at 18:07 +0100, Christian König wrote: > > > Am 18.02.19 um 10:47 schrieb Thomas Hellstrom: > > > > On Mon, 2019-02-18 at 09:20 +, Koenig, Christian wrote: > > > >

Re: [PATCH 1/1] [RFC] drm/ttm: Don't init dma32_zone on 64-bit systems

2019-02-19 Thread Kuehling, Felix
On 2019-02-18 3:39 p.m., Thomas Hellstrom wrote: > On Mon, 2019-02-18 at 18:07 +0100, Christian König wrote: >> Am 18.02.19 um 10:47 schrieb Thomas Hellstrom: >>> On Mon, 2019-02-18 at 09:20 +, Koenig, Christian wrote: Another good question is also why the heck the acc_size counts tow

Re: [PATCH 1/1] [RFC] drm/ttm: Don't init dma32_zone on 64-bit systems

2019-02-18 Thread Thomas Hellstrom
On Mon, 2019-02-18 at 18:07 +0100, Christian König wrote: > Am 18.02.19 um 10:47 schrieb Thomas Hellstrom: > > On Mon, 2019-02-18 at 09:20 +, Koenig, Christian wrote: > > > Another good question is also why the heck the acc_size counts > > > towards > > > the DMA32 zone? > > DMA32 TTM pages are

Re: [PATCH 1/1] [RFC] drm/ttm: Don't init dma32_zone on 64-bit systems

2019-02-18 Thread Christian König
Am 18.02.19 um 10:47 schrieb Thomas Hellstrom: On Mon, 2019-02-18 at 09:20 +, Koenig, Christian wrote: Another good question is also why the heck the acc_size counts towards the DMA32 zone? DMA32 TTM pages are accounted in the DMA32 zone. Other pages are not. Yeah, I'm perfectly aware of

Re: [PATCH 1/1] [RFC] drm/ttm: Don't init dma32_zone on 64-bit systems

2019-02-18 Thread Thomas Hellstrom
On Mon, 2019-02-18 at 09:20 +, Koenig, Christian wrote: > Another good question is also why the heck the acc_size counts > towards > the DMA32 zone? DMA32 TTM pages are accounted in the DMA32 zone. Other pages are not. For small persistent allocations using ttm_mem_global_alloc(), they are a

Re: [PATCH 1/1] [RFC] drm/ttm: Don't init dma32_zone on 64-bit systems

2019-02-18 Thread Koenig, Christian
Another good question is also why the heck the acc_size counts towards the DMA32 zone? In other words why should the internal bookkeeping pages be allocated in the DMA32 zone? That doesn't sounds valid to me in any way, Christian. Am 18.02.19 um 09:02 schrieb Thomas Hellstrom: > Hmm, > > This

Re: [PATCH 1/1] [RFC] drm/ttm: Don't init dma32_zone on 64-bit systems

2019-02-18 Thread Thomas Hellstrom
Hmm, This zone was intended to stop TTM page allocations from exhausting the DMA32 zone. IIRC dma_alloc_coherent() uses DMA32 by default, which means if we drop this check, other devices may stop functioning unexpectedly? However, in the end I'd expect the kernel page allocation system to mak

[PATCH 1/1] [RFC] drm/ttm: Don't init dma32_zone on 64-bit systems

2019-02-15 Thread Kuehling, Felix
This is an RFC. I'm not sure this is the right solution, but it highlights the problem I'm trying to solve. The dma32_zone limits the acc_size of all allocated BOs to 2GB. On a 64-bit system with hundreds of GB of system memory and GPU memory, this can become a bottle neck. We're seeing TTM memory