On Mon, Jan 11, 2010 at 10:13 AM, Xavier <shiningxc at gmail.com> 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"
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 at gmail.com> wrote:> On Mon, Jan 11, 2010 at 10:13 AM, Xavier <shiningxc at gmail.com> 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 at lists.freedesktop.org > http://lists.freedesktop.org/mailman/listinfo/nouveau >
Francisco Jerez
2010-Jan-12 17:49 UTC
[Nouveau] [PATCH] drm/ttm: Avoid conflicting reserve_memtype during ttm_tt_set_page_caching.
Fixes errors like:> reserve_ram_pages_type failed 0x15b7a000-0x15b7b000, track 0x8, req 0x10when a BO is moved between WC and UC areas. Reported-by: Xavier Chantry <shiningxc at gmail.com> Signed-off-by: Francisco Jerez <currojerez at 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