Re: Performance regression in ast drm driver

From: Takashi Iwai
Date: Mon Nov 12 2018 - 09:45:34 EST


On Mon, 12 Nov 2018 15:36:07 +0100,
Jean Delvare wrote:
>
> Hi David,
>
> On Fri, 2018-11-09 at 10:04 +1000, David Airlie wrote:
> > On Thu, Nov 8, 2018 at 10:05 PM Jean Delvare <jdelvare@xxxxxxx> wrote:
> > >
> > > On Thu, 1 Nov 2018 16:27:07 +0100, Jean Delvare wrote:
> > > > Hi David,
> > > >
> > > > The following commit:
> > > >
> > > > commit 7cf321d118a825c1541b43ca45294126fd474efa
> > > > Author: Dave Airlie
> > > > Date: Mon Oct 24 15:37:48 2016 +1000
> > > >
> > > > drm/drivers: add support for using the arch wc mapping API.
> > > >
> > > > is causing a huge performance regression for the ast drm driver. In a
> > > > text console, if I call "cat" on a large text file, it takes almost
> > > > twice as much time to be displayed and scrolled completely.
> > > >
> > > > Can you please check that the ast driver portion of that commit is both
> > > > correct and complete?
> > >
> > > And in the meantime, what bad will happen if we just revert the ast
> > > portion of that commit?
> >
> > This seems likely to be a hw problem with PCI writes to the AST "GPU",
> > since it's just some sort of RAM + ARM on the end of a PCIE bus, we've
> > definitely seen possible issues in the past with write combining
> > around some of the mga GPUs with some CPUs.
>
> Takashi asked me to compare the contents of
> /sys/kernel/debug/x86/pat_memtype_list before and after the commit
> above. Before the commit, we have:
>
> uncached-minus @ 0xfafe0000-0xfb000000
> uncached-minus @ 0xfb000000-0xfb005000
> write-combining @ 0xfb005000-0xfb584000
>
> After the commit, we have:
>
> uncached-minus @ 0xfafe0000-0xfb000000
> uncached-minus @ 0xfb000000-0xfb005000
> uncached-minus @ 0xfb000000-0xfb800000
> uncached-minus @ 0xfb005000-0xfb584000

Just to be sure:
could you double-check whether you're checking the right order
(i.e. not checking against the revert)? The change above looks
illogical from what I can see from the commit...


thanks,

Takashi

>
> The corresponding lines in /proc/iomem are:
>
> f0000000-fed8ffff : PCI Bus 0000:00
> Â faf00000-fb7fffff : PCI Bus 0000:01
> ÂÂÂÂfafe0000-faffffff : 0000:01:01.0
> ÂÂÂÂfb000000-fb7fffff : 0000:01:01.0
>
> Does it help? Is the change of type expected? Is it not a problem that
> one of the ranges is overlapping with 2 other ranges?
>
> --
> Jean Delvare
> SUSE L3 Support
>