All of lore.kernel.org
 help / color / mirror / Atom feed
* reserve_ram_pages_type failed
@ 2010-01-12  0:10 Xavier
       [not found] ` <91752841001111610q78af5515g73725e3c4aa56e67-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
  0 siblings, 1 reply; 5+ messages in thread
From: Xavier @ 2010-01-12  0:10 UTC (permalink / raw)
  To: nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW

On Mon, Jan 11, 2010 at 10:13 AM, Xavier <shiningxc-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
> [  268.666662] reserve_ram_pages_type failed 0x9cba000-0x9cbb000,
> track 0x8, req 0x10
> [  269.001031] reserve_ram_pages_type failed 0x6ff0000-0x6ff1000,
> track 0x8, req 0x10
> [  269.474134] reserve_ram_pages_type failed 0x68f2000-0x68f3000,
> track 0x8, req 0x10
> [  269.767270] reserve_ram_pages_type failed 0x14c98000-0x14c99000,
> track 0x8, req 0x10
> [  269.783213] reserve_ram_pages_type failed 0x23eb000-0x23ec000,
> track 0x8, req 0x10
> [  270.161672] reserve_ram_pages_type failed 0x10784000-0x10785000,
> track 0x8, req 0x10
> [  270.376144] reserve_ram_pages_type failed 0x9e01000-0x9e02000,
> track 0x8, req 0x10
> [  271.169852] reserve_ram_pages_type failed 0xe1b7000-0xe1b8000,
> track 0x8, req 0x10
> [  271.607980] reserve_ram_pages_type failed 0x3ae2000-0x3ae3000,
> track 0x8, req 0x10
> [  272.027030] reserve_ram_pages_type failed 0x195e8000-0x195e9000,
> track 0x8, req 0x10
> [  284.930170] reserve_ram_pages_type failed 0xdcd4000-0xdcd5000,
> track 0x8, req 0x10
> [  285.043614] reserve_ram_pages_type failed 0x36c5000-0x36c6000,
> track 0x8, req 0x10
> [  285.941944] reserve_ram_pages_type failed 0x30d2000-0x30d3000,
> track 0x8, req 0x10
> [  341.055291] reserve_ram_pages_type failed 0x1b90b000-0x1b90c000,
> track 0x8, req 0x10
> [  355.005349] [drm] nouveau 0000:03:00.0: nouveau_channel_free: freeing fifo 2
> [  355.074031] etracer used greatest stack depth: 5632 bytes left
>

Using a more recent nv25 classic mesa, I get no crash/bug, no validate
-12,  but I still get all the reserve_ram_pages_type errors. They
always come up on every new level started in etracer.
So the game will run at 0fps for 10-30 seconds displaying >10
reserve_ram_pages_type failed errors, and then it will run fine.

Maarten seemed to say these errors were a big deal, so I thought I
would share my new way to generate a lot of them.

I would be curious to know the link between this scenario and the
"loading big picture in firefox one" that goes like this :
two "validate: -12" + one "reserve_ram_pages_type failed"

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: reserve_ram_pages_type failed
       [not found] ` <91752841001111610q78af5515g73725e3c4aa56e67-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2010-01-12  8:33   ` Maarten Maathuis
  2010-01-12 17:49   ` [PATCH] drm/ttm: Avoid conflicting reserve_memtype during ttm_tt_set_page_caching Francisco Jerez
  1 sibling, 0 replies; 5+ messages in thread
From: Maarten Maathuis @ 2010-01-12  8:33 UTC (permalink / raw)
  To: Xavier; +Cc: nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW

For completeness, track 8 means the pages are mapped write combined,
and req 16 means they were going to be mapped uncached (this is for
agp gart). This can be found in the x86 specific PAE code that is
invoked upon ioremap.

On Tue, Jan 12, 2010 at 1:10 AM, Xavier <shiningxc-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
> On Mon, Jan 11, 2010 at 10:13 AM, Xavier <shiningxc-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
>> [  268.666662] reserve_ram_pages_type failed 0x9cba000-0x9cbb000,
>> track 0x8, req 0x10
>> [  269.001031] reserve_ram_pages_type failed 0x6ff0000-0x6ff1000,
>> track 0x8, req 0x10
>> [  269.474134] reserve_ram_pages_type failed 0x68f2000-0x68f3000,
>> track 0x8, req 0x10
>> [  269.767270] reserve_ram_pages_type failed 0x14c98000-0x14c99000,
>> track 0x8, req 0x10
>> [  269.783213] reserve_ram_pages_type failed 0x23eb000-0x23ec000,
>> track 0x8, req 0x10
>> [  270.161672] reserve_ram_pages_type failed 0x10784000-0x10785000,
>> track 0x8, req 0x10
>> [  270.376144] reserve_ram_pages_type failed 0x9e01000-0x9e02000,
>> track 0x8, req 0x10
>> [  271.169852] reserve_ram_pages_type failed 0xe1b7000-0xe1b8000,
>> track 0x8, req 0x10
>> [  271.607980] reserve_ram_pages_type failed 0x3ae2000-0x3ae3000,
>> track 0x8, req 0x10
>> [  272.027030] reserve_ram_pages_type failed 0x195e8000-0x195e9000,
>> track 0x8, req 0x10
>> [  284.930170] reserve_ram_pages_type failed 0xdcd4000-0xdcd5000,
>> track 0x8, req 0x10
>> [  285.043614] reserve_ram_pages_type failed 0x36c5000-0x36c6000,
>> track 0x8, req 0x10
>> [  285.941944] reserve_ram_pages_type failed 0x30d2000-0x30d3000,
>> track 0x8, req 0x10
>> [  341.055291] reserve_ram_pages_type failed 0x1b90b000-0x1b90c000,
>> track 0x8, req 0x10
>> [  355.005349] [drm] nouveau 0000:03:00.0: nouveau_channel_free: freeing fifo 2
>> [  355.074031] etracer used greatest stack depth: 5632 bytes left
>>
>
> Using a more recent nv25 classic mesa, I get no crash/bug, no validate
> -12,  but I still get all the reserve_ram_pages_type errors. They
> always come up on every new level started in etracer.
> So the game will run at 0fps for 10-30 seconds displaying >10
> reserve_ram_pages_type failed errors, and then it will run fine.
>
> Maarten seemed to say these errors were a big deal, so I thought I
> would share my new way to generate a lot of them.
>
> I would be curious to know the link between this scenario and the
> "loading big picture in firefox one" that goes like this :
> two "validate: -12" + one "reserve_ram_pages_type failed"
> _______________________________________________
> Nouveau mailing list
> Nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org
> http://lists.freedesktop.org/mailman/listinfo/nouveau
>

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH] drm/ttm: Avoid conflicting reserve_memtype during ttm_tt_set_page_caching.
       [not found] ` <91752841001111610q78af5515g73725e3c4aa56e67-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
  2010-01-12  8:33   ` Maarten Maathuis
@ 2010-01-12 17:49   ` Francisco Jerez
  2010-01-26 11:48     ` Francisco Jerez
  1 sibling, 1 reply; 5+ messages in thread
From: Francisco Jerez @ 2010-01-12 17:49 UTC (permalink / raw)
  To: dri-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f
  Cc: nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW

Fixes errors like:
> reserve_ram_pages_type failed 0x15b7a000-0x15b7b000, track 0x8, req 0x10
when a BO is moved between WC and UC areas.

Reported-by: Xavier Chantry <shiningxc-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Signed-off-by: Francisco Jerez <currojerez-sGOZH3hwPm2sTnJN9+BGXg@public.gmane.org>
---
 drivers/gpu/drm/ttm/ttm_tt.c |   23 ++++++++++++++++-------
 1 files changed, 16 insertions(+), 7 deletions(-)

diff --git a/drivers/gpu/drm/ttm/ttm_tt.c b/drivers/gpu/drm/ttm/ttm_tt.c
index 9c2b1cc..e2123af 100644
--- a/drivers/gpu/drm/ttm/ttm_tt.c
+++ b/drivers/gpu/drm/ttm/ttm_tt.c
@@ -198,17 +198,26 @@ EXPORT_SYMBOL(ttm_tt_populate);
 static inline int ttm_tt_set_page_caching(struct page *p,
 					  enum ttm_caching_state c_state)
 {
+	int ret = 0;
+
 	if (PageHighMem(p))
 		return 0;
 
-	switch (c_state) {
-	case tt_cached:
-		return set_pages_wb(p, 1);
-	case tt_wc:
-	    return set_memory_wc((unsigned long) page_address(p), 1);
-	default:
-		return set_pages_uc(p, 1);
+	if (get_page_memtype(p) != -1) {
+		/* p isn't in the default caching state, set it to
+		 * writeback first to free its current memtype. */
+
+		ret = set_pages_wb(p, 1);
+		if (ret)
+			return ret;
 	}
+
+	if (c_state == tt_wc)
+		ret = set_memory_wc((unsigned long) page_address(p), 1);
+	else if (c_state == tt_uncached)
+		ret = set_pages_uc(p, 1);
+
+	return ret;
 }
 #else /* CONFIG_X86 */
 static inline int ttm_tt_set_page_caching(struct page *p,
-- 
1.6.4.4

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH] drm/ttm: Avoid conflicting reserve_memtype during ttm_tt_set_page_caching.
  2010-01-12 17:49   ` [PATCH] drm/ttm: Avoid conflicting reserve_memtype during ttm_tt_set_page_caching Francisco Jerez
@ 2010-01-26 11:48     ` Francisco Jerez
  2010-01-26 12:25       ` Thomas Hellstrom
  0 siblings, 1 reply; 5+ messages in thread
From: Francisco Jerez @ 2010-01-26 11:48 UTC (permalink / raw)
  To: Thomas Hellstrom; +Cc: dri-devel


[-- Attachment #1.1.1: Type: text/plain, Size: 1747 bytes --]

Sorry for bringing this up again with nothing new to say, but it's still
a problem (on nouveau it usually triggers a slow CPU-based eviction
fallback). Thomas: Are you OK with this patch?


> Fixes errors like:
> > reserve_ram_pages_type failed 0x15b7a000-0x15b7b000, track 0x8, req 0x10
> when a BO is moved between WC and UC areas.
> 
> Reported-by: Xavier Chantry <shiningxc@gmail.com>
> Signed-off-by: Francisco Jerez <currojerez@riseup.net>
> ---
>  drivers/gpu/drm/ttm/ttm_tt.c |   23 ++++++++++++++++-------
>  1 files changed, 16 insertions(+), 7 deletions(-)
> 
> diff --git a/drivers/gpu/drm/ttm/ttm_tt.c b/drivers/gpu/drm/ttm/ttm_tt.c
> index 9c2b1cc..e2123af 100644
> --- a/drivers/gpu/drm/ttm/ttm_tt.c
> +++ b/drivers/gpu/drm/ttm/ttm_tt.c
> @@ -198,17 +198,26 @@ EXPORT_SYMBOL(ttm_tt_populate);
>  static inline int ttm_tt_set_page_caching(struct page *p,
>  					  enum ttm_caching_state c_state)
>  {
> +	int ret = 0;
> +
>  	if (PageHighMem(p))
>  		return 0;
>  
> -	switch (c_state) {
> -	case tt_cached:
> -		return set_pages_wb(p, 1);
> -	case tt_wc:
> -	    return set_memory_wc((unsigned long) page_address(p), 1);
> -	default:
> -		return set_pages_uc(p, 1);
> +	if (get_page_memtype(p) != -1) {
> +		/* p isn't in the default caching state, set it to
> +		 * writeback first to free its current memtype. */
> +
> +		ret = set_pages_wb(p, 1);
> +		if (ret)
> +			return ret;
>  	}
> +
> +	if (c_state == tt_wc)
> +		ret = set_memory_wc((unsigned long) page_address(p), 1);
> +	else if (c_state == tt_uncached)
> +		ret = set_pages_uc(p, 1);
> +
> +	return ret;
>  }
>  #else /* CONFIG_X86 */
>  static inline int ttm_tt_set_page_caching(struct page *p,
> -- 
> 1.6.4.4

[-- Attachment #1.2: Type: application/pgp-signature, Size: 197 bytes --]

[-- Attachment #2: Type: text/plain, Size: 408 bytes --]

------------------------------------------------------------------------------
The Planet: dedicated and managed hosting, cloud storage, colocation
Stay online with enterprise data centers and the best network in the business
Choose flexible plans and management services without long-term contracts
Personal 24x7 support from experience hosting pros just a phone call away.
http://p.sf.net/sfu/theplanet-com

[-- Attachment #3: Type: text/plain, Size: 161 bytes --]

--
_______________________________________________
Dri-devel mailing list
Dri-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] drm/ttm: Avoid conflicting reserve_memtype during ttm_tt_set_page_caching.
  2010-01-26 11:48     ` Francisco Jerez
@ 2010-01-26 12:25       ` Thomas Hellstrom
  0 siblings, 0 replies; 5+ messages in thread
From: Thomas Hellstrom @ 2010-01-26 12:25 UTC (permalink / raw)
  To: Francisco Jerez; +Cc: dri-devel

Francisco Jerez wrote:
> Sorry for bringing this up again with nothing new to say, but it's still
> a problem (on nouveau it usually triggers a slow CPU-based eviction
> fallback). Thomas: Are you OK with this patch?
>
>   

Sorry, I've missed this patch. So is the problem that the core kernel 
complains if you try to move directly from wc to uc? In that case it 
looks OK to me:

Acked-by: Thomas Hellstrom <thellstrom@vmware.com>


>   
>> Fixes errors like:
>>     
>>> reserve_ram_pages_type failed 0x15b7a000-0x15b7b000, track 0x8, req 0x10
>>>       
>> when a BO is moved between WC and UC areas.
>>
>> Reported-by: Xavier Chantry <shiningxc@gmail.com>
>> Signed-off-by: Francisco Jerez <currojerez@riseup.net>
>> ---
>>  drivers/gpu/drm/ttm/ttm_tt.c |   23 ++++++++++++++++-------
>>  1 files changed, 16 insertions(+), 7 deletions(-)
>>
>> diff --git a/drivers/gpu/drm/ttm/ttm_tt.c b/drivers/gpu/drm/ttm/ttm_tt.c
>> index 9c2b1cc..e2123af 100644
>> --- a/drivers/gpu/drm/ttm/ttm_tt.c
>> +++ b/drivers/gpu/drm/ttm/ttm_tt.c
>> @@ -198,17 +198,26 @@ EXPORT_SYMBOL(ttm_tt_populate);
>>  static inline int ttm_tt_set_page_caching(struct page *p,
>>  					  enum ttm_caching_state c_state)
>>  {
>> +	int ret = 0;
>> +
>>  	if (PageHighMem(p))
>>  		return 0;
>>  
>> -	switch (c_state) {
>> -	case tt_cached:
>> -		return set_pages_wb(p, 1);
>> -	case tt_wc:
>> -	    return set_memory_wc((unsigned long) page_address(p), 1);
>> -	default:
>> -		return set_pages_uc(p, 1);
>> +	if (get_page_memtype(p) != -1) {
>> +		/* p isn't in the default caching state, set it to
>> +		 * writeback first to free its current memtype. */
>> +
>> +		ret = set_pages_wb(p, 1);
>> +		if (ret)
>> +			return ret;
>>  	}
>> +
>> +	if (c_state == tt_wc)
>> +		ret = set_memory_wc((unsigned long) page_address(p), 1);
>> +	else if (c_state == tt_uncached)
>> +		ret = set_pages_uc(p, 1);
>> +
>> +	return ret;
>>  }
>>  #else /* CONFIG_X86 */
>>  static inline int ttm_tt_set_page_caching(struct page *p,
>> -- 
>> 1.6.4.4
>>     


------------------------------------------------------------------------------
The Planet: dedicated and managed hosting, cloud storage, colocation
Stay online with enterprise data centers and the best network in the business
Choose flexible plans and management services without long-term contracts
Personal 24x7 support from experience hosting pros just a phone call away.
http://p.sf.net/sfu/theplanet-com
--

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2010-01-26 12:25 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-01-12  0:10 reserve_ram_pages_type failed Xavier
     [not found] ` <91752841001111610q78af5515g73725e3c4aa56e67-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2010-01-12  8:33   ` Maarten Maathuis
2010-01-12 17:49   ` [PATCH] drm/ttm: Avoid conflicting reserve_memtype during ttm_tt_set_page_caching Francisco Jerez
2010-01-26 11:48     ` Francisco Jerez
2010-01-26 12:25       ` Thomas Hellstrom

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.