Re: ttm: merge ttm_backend & ttm_tt, introduce ttm dma allocator V5

2011-11-16 Thread Konrad Rzeszutek Wilk
> > which I think was your V4 posting (or earlier) (the last patch is something 
> > I added
> > to toggle it off/on to test).
> 
> You have to allocate like a million of gem object to trigger it.
> 

Which I certainly did not, but I did find an accounting error in the
rebased v5 version of the TTM DMA that might be the culprit. Will build
a kernel shortly with those changes and see how it fares.

> >
> > The latest (V5) hit the OOM quite fast - took about an hour or two of me
> > answering emails (mutt inside gnome-terminal) and using both chrome and 
> > firefox,
> > and running a make -j10 on the Linux kernel.
> >
> > Time to turn on more debugging :-)
> >
> 
> Hhhhmm weird i did not run into that. will try to run heavy make with
> graphic along side. Does it happen without
> 0014-drm-ttm-simplify-memory-accounting-for-ttm-user.patch ?

Will try reverting it out and see what happends.
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel


Re: ttm: merge ttm_backend & ttm_tt, introduce ttm dma allocator V5

2011-11-16 Thread Jerome Glisse
On Wed, Nov 16, 2011 at 10:15 AM, Konrad Rzeszutek Wilk
 wrote:
> On Mon, Nov 14, 2011 at 01:54:27PM -0500, Jerome Glisse wrote:
>> On Mon, Nov 14, 2011 at 05:06:42PM +0100, Thomas Hellstrom wrote:
>> > On 11/14/2011 05:02 PM, Jerome Glisse wrote:
>> > >On Mon, Nov 14, 2011 at 9:49 AM, Thomas Hellstrom  
>> > >wrote:
>> > >>On 11/11/2011 11:47 PM, j.gli...@gmail.com wrote:
>> > >>>So attached is updated serie of patch with fixes for swaping issue
>> > >>>that also impacted memory accounting.
>> > >>Jerome,
>> > >>Out of interest, what was the swapping issue?
>> > >>
>> > >>/Thomas
>> > >>
>> > >>
>> > >The page list was NULL and some access ended up freaking the kernel
>> > >and oom kicked in for some reason i still don't understand. Bottom
>
> Was it like this:
>
> Nov 16 10:02:02 phenom kernel: [ 4477.232933] [TTM] Out of kernel memory.
> Nov 16 10:02:02 phenom kernel: [ 4477.232958] radeon :01:00.0: 
> object_init failed for (12288, 0x0002)
> Nov 16 10:02:02 phenom kernel: [ 4477.232963] [drm:radeon_gem_object_create] 
> *ERROR* Failed to allocate GEM object (12288, 2, 4096, -12)
> Nov 16 10:02:02 phenom kernel: [ 4477.248329] [TTM] Out of kernel memory.
>
> followed up with an OOM?

Can't say want to fast last message i got on screen was oom and then
complete freeze.

>> > >line things were going south in a split second leaving me with no log
>> > >or access, i thought it was accounting not working as it was what i
>> > >tested at the time. I should have tested accouting without the
>> > >patchset
>
> Weirdly enough, I did _not_ see this with the patchset:
>
> 592d002 drm/ttm: remove userspace backed ttm object support
> 9f1cf44 drm/ttm: remove split btw highmen and lowmem page
> d27ea32 drm/ttm: remove unused backend flags field
> dad5ef9 drm/ttm: use ttm put pages function to properly restore cache 
> attribute
> 6aa902d drm/ttm: overhaul memory accounting
> 60d0fa6 drm/ttm: convert page allocation to use page ptr array instead of 
> list V4
> abde3ec drm/ttm: test for dma_address array allocation failure
> 8145582 drm/ttm: merge ttm_backend and ttm_tt V2
> 0216e52 drm/ttm: introduce callback for ttm_tt populate & unpopulate V2
> ecb0d22 ttm: Provide DMA aware TTM page pool code. V5
> 793dc40 swiotlb: Expose swiotlb_nr_tlb function to modules
> 767aa47 drm/radeon/kms: Enable the TTM DMA pool if swiotlb is on V2
> e91d0f0 drm/nouveau: enable the TTM DMA pool on 32-bit DMA only device V2
> 6eda9c3 ttm:dma: Add 'ttm_dma' module to radeon and nouveau to force enable 
> the TTM DMA
>
> which I think was your V4 posting (or earlier) (the last patch is something I 
> added
> to toggle it off/on to test).

You have to allocate like a million of gem object to trigger it.

>
> The latest (V5) hit the OOM quite fast - took about an hour or two of me
> answering emails (mutt inside gnome-terminal) and using both chrome and 
> firefox,
> and running a make -j10 on the Linux kernel.
>
> Time to turn on more debugging :-)
>

Hhhhmm weird i did not run into that. will try to run heavy make with
graphic along side. Does it happen without
0014-drm-ttm-simplify-memory-accounting-for-ttm-user.patch ?

Cheers,
Jerome
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel


Re: ttm: merge ttm_backend & ttm_tt, introduce ttm dma allocator V5

2011-11-16 Thread Konrad Rzeszutek Wilk
On Mon, Nov 14, 2011 at 01:54:27PM -0500, Jerome Glisse wrote:
> On Mon, Nov 14, 2011 at 05:06:42PM +0100, Thomas Hellstrom wrote:
> > On 11/14/2011 05:02 PM, Jerome Glisse wrote:
> > >On Mon, Nov 14, 2011 at 9:49 AM, Thomas Hellstrom  
> > >wrote:
> > >>On 11/11/2011 11:47 PM, j.gli...@gmail.com wrote:
> > >>>So attached is updated serie of patch with fixes for swaping issue
> > >>>that also impacted memory accounting.
> > >>Jerome,
> > >>Out of interest, what was the swapping issue?
> > >>
> > >>/Thomas
> > >>
> > >>
> > >The page list was NULL and some access ended up freaking the kernel
> > >and oom kicked in for some reason i still don't understand. Bottom

Was it like this:

Nov 16 10:02:02 phenom kernel: [ 4477.232933] [TTM] Out of kernel memory.
Nov 16 10:02:02 phenom kernel: [ 4477.232958] radeon :01:00.0: object_init 
failed for (12288, 0x0002)
Nov 16 10:02:02 phenom kernel: [ 4477.232963] [drm:radeon_gem_object_create] 
*ERROR* Failed to allocate GEM object (12288, 2, 4096, -12)
Nov 16 10:02:02 phenom kernel: [ 4477.248329] [TTM] Out of kernel memory.

followed up with an OOM?

> > >line things were going south in a split second leaving me with no log
> > >or access, i thought it was accounting not working as it was what i
> > >tested at the time. I should have tested accouting without the
> > >patchset

Weirdly enough, I did _not_ see this with the patchset:

592d002 drm/ttm: remove userspace backed ttm object support
9f1cf44 drm/ttm: remove split btw highmen and lowmem page
d27ea32 drm/ttm: remove unused backend flags field
dad5ef9 drm/ttm: use ttm put pages function to properly restore cache attribute
6aa902d drm/ttm: overhaul memory accounting
60d0fa6 drm/ttm: convert page allocation to use page ptr array instead of list 
V4
abde3ec drm/ttm: test for dma_address array allocation failure
8145582 drm/ttm: merge ttm_backend and ttm_tt V2
0216e52 drm/ttm: introduce callback for ttm_tt populate & unpopulate V2
ecb0d22 ttm: Provide DMA aware TTM page pool code. V5
793dc40 swiotlb: Expose swiotlb_nr_tlb function to modules
767aa47 drm/radeon/kms: Enable the TTM DMA pool if swiotlb is on V2
e91d0f0 drm/nouveau: enable the TTM DMA pool on 32-bit DMA only device V2
6eda9c3 ttm:dma: Add 'ttm_dma' module to radeon and nouveau to force enable the 
TTM DMA

which I think was your V4 posting (or earlier) (the last patch is something I 
added
to toggle it off/on to test).

The latest (V5) hit the OOM quite fast - took about an hour or two of me
answering emails (mutt inside gnome-terminal) and using both chrome and firefox,
and running a make -j10 on the Linux kernel.

Time to turn on more debugging :-)
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel


Re: ttm: merge ttm_backend & ttm_tt, introduce ttm dma allocator V5

2011-11-14 Thread Thomas Hellstrom

On 11/14/2011 07:54 PM, Jerome Glisse wrote:

On Mon, Nov 14, 2011 at 05:06:42PM +0100, Thomas Hellstrom wrote:
   

On 11/14/2011 05:02 PM, Jerome Glisse wrote:
 

On Mon, Nov 14, 2011 at 9:49 AM, Thomas Hellstrom   
wrote:
   

On 11/11/2011 11:47 PM, j.gli...@gmail.com wrote:
 

So attached is updated serie of patch with fixes for swaping issue
that also impacted memory accounting.
   

Jerome,
Out of interest, what was the swapping issue?

/Thomas


 

The page list was NULL and some access ended up freaking the kernel
and oom kicked in for some reason i still don't understand. Bottom
line things were going south in a split second leaving me with no log
or access, i thought it was accounting not working as it was what i
tested at the time. I should have tested accouting without the
patchset

Cheers,
Jerome
   

Still, I think you have a point in the fact that *when* finally the
OOM killer kicks in,
it probably doesn't have a way to associate user-space created bos
with processes
and kill the right process.

/Thomas

 

Btw can you review patch 14 as it touch vmwgfx, i am pretty sure
i got it right.

Cheers,
Jerome
   

Yes I will do a more thorough review tomorrow of all unreviewed stuff.

/Thomas






___
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel


Re: ttm: merge ttm_backend & ttm_tt, introduce ttm dma allocator V5

2011-11-14 Thread Jerome Glisse
On Mon, Nov 14, 2011 at 05:06:42PM +0100, Thomas Hellstrom wrote:
> On 11/14/2011 05:02 PM, Jerome Glisse wrote:
> >On Mon, Nov 14, 2011 at 9:49 AM, Thomas Hellstrom  
> >wrote:
> >>On 11/11/2011 11:47 PM, j.gli...@gmail.com wrote:
> >>>So attached is updated serie of patch with fixes for swaping issue
> >>>that also impacted memory accounting.
> >>Jerome,
> >>Out of interest, what was the swapping issue?
> >>
> >>/Thomas
> >>
> >>
> >The page list was NULL and some access ended up freaking the kernel
> >and oom kicked in for some reason i still don't understand. Bottom
> >line things were going south in a split second leaving me with no log
> >or access, i thought it was accounting not working as it was what i
> >tested at the time. I should have tested accouting without the
> >patchset
> >
> >Cheers,
> >Jerome
> 
> Still, I think you have a point in the fact that *when* finally the
> OOM killer kicks in,
> it probably doesn't have a way to associate user-space created bos
> with processes
> and kill the right process.
> 
> /Thomas
> 

Btw can you review patch 14 as it touch vmwgfx, i am pretty sure
i got it right.

Cheers,
Jerome
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel


Re: ttm: merge ttm_backend & ttm_tt, introduce ttm dma allocator V5

2011-11-14 Thread Thomas Hellstrom

On 11/14/2011 05:02 PM, Jerome Glisse wrote:

On Mon, Nov 14, 2011 at 9:49 AM, Thomas Hellstrom  wrote:
   

On 11/11/2011 11:47 PM, j.gli...@gmail.com wrote:
 

So attached is updated serie of patch with fixes for swaping issue
that also impacted memory accounting.
   

Jerome,
Out of interest, what was the swapping issue?

/Thomas


 

The page list was NULL and some access ended up freaking the kernel
and oom kicked in for some reason i still don't understand. Bottom
line things were going south in a split second leaving me with no log
or access, i thought it was accounting not working as it was what i
tested at the time. I should have tested accouting without the
patchset

Cheers,
Jerome
   


Still, I think you have a point in the fact that *when* finally the OOM 
killer kicks in,
it probably doesn't have a way to associate user-space created bos with 
processes

and kill the right process.

/Thomas

___
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel


Re: ttm: merge ttm_backend & ttm_tt, introduce ttm dma allocator V5

2011-11-14 Thread Jerome Glisse
On Mon, Nov 14, 2011 at 9:49 AM, Thomas Hellstrom  wrote:
> On 11/11/2011 11:47 PM, j.gli...@gmail.com wrote:
>>
>> So attached is updated serie of patch with fixes for swaping issue
>> that also impacted memory accounting.
>
> Jerome,
> Out of interest, what was the swapping issue?
>
> /Thomas
>
>

The page list was NULL and some access ended up freaking the kernel
and oom kicked in for some reason i still don't understand. Bottom
line things were going south in a split second leaving me with no log
or access, i thought it was accounting not working as it was what i
tested at the time. I should have tested accouting without the
patchset

Cheers,
Jerome
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel


Re: ttm: merge ttm_backend & ttm_tt, introduce ttm dma allocator V5

2011-11-14 Thread Thomas Hellstrom

On 11/11/2011 11:47 PM, j.gli...@gmail.com wrote:

So attached is updated serie of patch with fixes for swaping issue
that also impacted memory accounting.


Jerome,
Out of interest, what was the swapping issue?

/Thomas




  Last patch fix memory accounting
for radeon&  nouveau. I think it's ready to go into drm-next, patchset
is against linus tree as there is thing there not in next that conflict.
(in radeon iirc)

Cheers,
Jerome

   


___
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel