Comment 189 for bug 541511

Revision history for this message
In , Indan (indan) wrote :

(In reply to comment #134)
> > --- Comment #132 from Indan Zupancic <email address hidden> 2010-04-19 15:26:36 PDT ---
> > What I don't understand is why your patch slows things down so much for me,
> > it seems to do only a few thousand flushes anyway.
>
> Well, worst-case a flush can take 1 ms.

That would explain it yes.

[cut]
> > If the problem is that the flush is needed to avoid the hardware from writing
> > stale data to old gtt mapped physical memory:
> >
> > - If an entry is added, there should be no need for a flush, because the all
> > memory is still valid. If an entry is removed, the gpu can continue to write
> > to those pages. What about copying the content to a new physical page and
> > keeping the original page for a while until the gpu is done with it?
>
> Something similar is already done. Look for scratch_page in intel-gtt.c

But if done properly the need for flushing would go away altogether. Considering it's quite stable here without those extra flushes, perhaps it's easier to fix the corner cases that still need flushing instead of getting flushing reliable?

> > > Ok, that's bad. Can you change the following define in
> > > include/drm/intel-gtt.h and see whether you still get failed chipset
> > > flushes?
> > >
> > > -#define I830_CC_CANARY_FLOCK_GTT_PAGES 8
> > > +#define I830_CC_CANARY_FLOCK_GTT_PAGES 16
> > >
> > > The whole stuff make somewhat more sense this way around, anyway.
> >
> > I will try this later, first I'm going to try without your latest commit
> > ("fix i85x gtt chipset flush") to see how it behaves without that stuff,
> > both performance and amount of failed flushes.
>
> If your X40 is anything like mine, you're in for a bad surprise :(

Dmesg is full with backtraces, but other than that it's quite stable.
Performance is good too again.

Next week I should have a bit more time to read the code and do more testing.

> > > Oh, and add some details about your box, please (brand&model + cpu,
> > > mostly, the rest is all in the dmesg, anyway).
> >
> > See my first post: Thinkpad X40, 855GM (rev 02), Pentium M (family 6, model 13,
> > stepping 6: It has clflush).
>
> Thanks, I'm regularly losing my overview with all the different testers on
> this bug ;)

No problem, you're doing great. :-)