public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Andres Freund <andres@anarazel.de>
To: Jerome Glisse <j.glisse@gmail.com>
Cc: LKML <linux-kernel@vger.kernel.org>,
	David Airlie <airlied@linux.ie>,
	Jerome Glisse <jglisse@redhat.com>,
	Alex Deucher <alexander.deucher@amd.com>
Subject: Re: Excessive kernel time inside ttm when scrolling on a r700 in a multimonitor setup
Date: Mon, 15 Jun 2015 16:41:45 +0200	[thread overview]
Message-ID: <20150615144145.GG26554@alap3.anarazel.de> (raw)
In-Reply-To: <201209171315.14458.andres@anarazel.de>

Hi,

On 2012-09-17 13:15:14 +0200, Andres Freund wrote:
> On Monday, September 17, 2012 11:59:34 AM Jerome Glisse wrote:
> > On Mon, Sep 17, 2012 at 5:13 AM, Andres Freund <andres@anarazel.de> wrote:
> > > On Monday, September 17, 2012 10:47:10 AM Jerome Glisse wrote:
> > >> On Sun, Sep 16, 2012 at 7:18 PM, Andres Freund <andres@anarazel.de> wrote:
> > >> > Hi everyone,
> > >> > 
> > >> > In several gui programs, most notably and reproducably, I can
> > >> > trivially make Xorg spend the whole cpu time in the kernel. It might
> > >> > be an Xorg bug, but from my untrained gut feeling it doesn't look
> > >> > that way.
> > >> > 
> > >> > Anything more you need than whats already in the email?
> > >> 
> > >> > Here are some details:
> > >> Is it an AGP card ? It looks like it's the PAT update that kills perf
> > >> for you, not much we can do, the pool allocator is probably starve.
> > > 
> > > If you mean AGP as in the old strange graphics bus, no. Its a pcie card.
> > > 
> > > If that helps you, more detailedly the card is a: SAPPHIRE Radeon HD6870
> > > 
> > > Unfortunately the manufacturers page is remarkably devoid of details...:
> > > http://www.sapphiretech.com/presentation/product/?cid=1&gid=3&sgid=1037&l
> > > id=1&pid=1270&leg=0
> > > 
> > > Greetings,
> > > 
> > > Andres
> > 
> > Well, then the issue is that it tries to allocate write combined pages
> > on PCIE which should not happen. I don't see how in the code you endup
> > in that path unless drm_pci_device_is_agp return true for some
> > reasons.

I've recently searched for the same problem on slightly different
hardware, and found my own old post. A bit of further digging and code
reading lead to the discovery that reconfiguring the kernel to not use
SWIOTLB but rather VT-D solved the problem.
i.e once
Jun 10 21:08:19 awork2 kernel: PCI-DMA: Intel(R) Virtualization Technology for Directed I/O
instead of
Jun 08 21:19:56 awork2 kernel: PCI-DMA: Using software bounce buffering for IO (SWIOTLB)
redrawing wasn't slow anymore.

If I see correctly it is the following codepath that doesn't work well
on multi socket systems:
static int radeon_ttm_tt_populate(struct ttm_tt *ttm)
{
...
#ifdef CONFIG_SWIOTLB
	if (swiotlb_nr_tbl()) {
		return ttm_dma_populate(&gtt->ttm, rdev->dev);
	}
#endif
...


I have no idea whether this is an expected problem, a bug, a scalability
limitation or anything. I primarily brought it up because somebody else
(or I myself) might later end up finding this thread again.

If there's something that could possibly be done about this, I'm happy
to help researching.

Greetings,

Andres Freund

      parent reply	other threads:[~2015-06-15 14:47 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-09-16 23:18 Excessive kernel time inside ttm when scrolling on a r700 in a multimonitor setup Andres Freund
2012-09-17  8:47 ` Jerome Glisse
2012-09-17  9:13   ` Andres Freund
2012-09-17  9:59     ` Jerome Glisse
     [not found]       ` <201209171315.14458.andres@anarazel.de>
2015-06-15 14:41         ` Andres Freund [this message]

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=20150615144145.GG26554@alap3.anarazel.de \
    --to=andres@anarazel.de \
    --cc=airlied@linux.ie \
    --cc=alexander.deucher@amd.com \
    --cc=j.glisse@gmail.com \
    --cc=jglisse@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    /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