linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Thomas Zimmermann <tzimmermann@suse.de>
To: Jean Delvare <jdelvare@suse.de>, David Airlie <airlied@redhat.com>
Cc: christian.koenig@amd.com,
	dri-devel <dri-devel@lists.freedesktop.org>,
	linux-kernel <linux-kernel@vger.kernel.org>,
	Takashi Iwai <tiwai@suse.de>
Subject: Re: Performance regression in ast drm driver
Date: Mon, 12 Nov 2018 20:36:00 +0100	[thread overview]
Message-ID: <c25b99fc-0762-ab88-7c08-f71510383e9e@suse.de> (raw)
In-Reply-To: <1542033367.2661.33.camel@suse.de>


[-- Attachment #1.1: Type: text/plain, Size: 2835 bytes --]

Hi Jean

Am 12.11.18 um 15:36 schrieb Jean Delvare:
> 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@suse.de> 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
> 
> 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?
> 

I debugged this problem with an AST 2000. What happens is that the
vesafb driver attaches first to the graphics device. It disables
write-combining and falls back to uncached access; unless the kernel has
been booted with video=vesafb:mtrr:3. Then it will set-up WC correctly.
The respective code is at [1].

Best regards
Thomas

[1]
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/video/fbdev/vesafb.c?h=v4.20-rc2#n415

-- 
Thomas Zimmermann
Graphics Driver Developer
SUSE Linux GmbH, Maxfeldstr. 5, D-90409 Nürnberg
Tel: +49-911-74053-0; Fax: +49-911-7417755;  https://www.suse.com/
SUSE Linux GmbH, GF: Felix Imendörffer, Jane Smithard,
Graham Norton, HRB 21284 (AG Nürnberg)


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

  parent reply	other threads:[~2018-11-12 19:36 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-01 15:27 Performance regression in ast drm driver Jean Delvare
2018-11-08 12:05 ` Jean Delvare
2018-11-09  0:04   ` David Airlie
2018-11-10  8:39     ` Jean Delvare
2018-11-12 14:36     ` Jean Delvare
2018-11-12 14:45       ` Takashi Iwai
2018-11-12 16:41         ` Jean Delvare
2018-11-13  9:23           ` Thomas Zimmermann
2018-11-13 12:08             ` Jean Delvare
2018-11-13 12:16               ` Thomas Zimmermann
2018-11-12 19:36       ` Thomas Zimmermann [this message]
2018-11-13  8:19   ` YC Chen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=c25b99fc-0762-ab88-7c08-f71510383e9e@suse.de \
    --to=tzimmermann@suse.de \
    --cc=airlied@redhat.com \
    --cc=christian.koenig@amd.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=jdelvare@suse.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tiwai@suse.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).