Re: [RFC] drm/ttm: add pool wc/uc page allocator

2010-03-03 Thread Pauli Nieminen
2010/3/2 Thomas Hellström tho...@shipmail.org: Michel Dänzer wrote: On Tue, 2010-03-02 at 00:32 +0200, Pauli Nieminen wrote: bo allocation is still too expensive operation for dma buffers in classic mesa. It takes quite a lot cpu time in bind memory (agp system) and ttm_mem_global

Re: [RFC] drm/ttm: add pool wc/uc page allocator

2010-03-03 Thread Luca Barbieri
While this is almost surely a good idea, note that userspace caching and suballocation substantially improves Mesa performance even on PCIe systems. This is mostly due to the unavoidable overhead of kernel calls and pagetable modifications, as well as the avoidable linear search the kernel

Re: [RFC] drm/ttm: add pool wc/uc page allocator

2010-03-03 Thread Thomas Hellstrom
Luca Barbieri wrote: While this is almost surely a good idea, note that userspace caching and suballocation substantially improves Mesa performance even on PCIe systems. This is mostly due to the unavoidable overhead of kernel calls and pagetable modifications, as well as the avoidable

Re: [RFC] drm/ttm: add pool wc/uc page allocator

2010-03-03 Thread Luca Barbieri
^^^ Luca, I've never seen this show up high on a profile (yet). Do you see that with Nouveau? I used to have an rb-tree implementation of drm_mm_xxx lying around, but I didn't use it because I didn't have a case where it showed up? Yes, before I did userspace allocation, in doom3 profiles,

Re: [RFC] drm/ttm: add pool wc/uc page allocator

2010-03-03 Thread Thomas Hellstrom
Luca Barbieri wrote: ^^^ Luca, I've never seen this show up high on a profile (yet). Do you see that with Nouveau? I used to have an rb-tree implementation of drm_mm_xxx lying around, but I didn't use it because I didn't have a case where it showed up? Yes, before I did userspace

Re: [RFC] drm/ttm: add pool wc/uc page allocator

2010-03-03 Thread Pauli Nieminen
On Wed, Mar 3, 2010 at 4:50 PM, Jerome Glisse gli...@freedesktop.org wrote: On Wed, Mar 03, 2010 at 04:23:08PM +0200, Pauli Nieminen wrote: On Wed, Mar 3, 2010 at 3:33 PM, Jerome Glisse gli...@freedesktop.org wrote: On Tue, Mar 02, 2010 at 12:32:54AM +0200, Pauli Nieminen wrote: On Sun, Feb

Re: [RFC] drm/ttm: add pool wc/uc page allocator

2010-03-03 Thread Jerome Glisse
On Wed, Mar 03, 2010 at 05:46:43PM +0200, Pauli Nieminen wrote: On Wed, Mar 3, 2010 at 4:50 PM, Jerome Glisse gli...@freedesktop.org wrote: On Wed, Mar 03, 2010 at 04:23:08PM +0200, Pauli Nieminen wrote: On Wed, Mar 3, 2010 at 3:33 PM, Jerome Glisse gli...@freedesktop.org wrote: On Tue,

Re: [RFC] drm/ttm: add pool wc/uc page allocator

2010-03-02 Thread Michel Dänzer
On Tue, 2010-03-02 at 00:32 +0200, Pauli Nieminen wrote: bo allocation is still too expensive operation for dma buffers in classic mesa. It takes quite a lot cpu time in bind memory (agp system) and ttm_mem_global functions. Would it be possible to move some parts those expensive operations

[RFC] drm/ttm: add pool wc/uc page allocator

2010-02-28 Thread Pauli Nieminen
On AGP system we might allocate/free routinely uncached or wc memory, changing page from cached (wb) to uc or wc is very expensive and involves a lot of flushing. To improve performance this allocator use a pool of uc,wc pages. Pools are linked lists of pages. Ordered so that first is the latest