Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755662AbbFOOry (ORCPT ); Mon, 15 Jun 2015 10:47:54 -0400 Received: from mail.anarazel.de ([217.115.131.40]:58843 "EHLO mail.anarazel.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751550AbbFOOrq (ORCPT ); Mon, 15 Jun 2015 10:47:46 -0400 X-Greylist: delayed 348 seconds by postgrey-1.27 at vger.kernel.org; Mon, 15 Jun 2015 10:47:46 EDT Date: Mon, 15 Jun 2015 16:41:45 +0200 From: Andres Freund To: Jerome Glisse Cc: LKML , David Airlie , Jerome Glisse , Alex Deucher Subject: Re: Excessive kernel time inside ttm when scrolling on a r700 in a multimonitor setup Message-ID: <20150615144145.GG26554@alap3.anarazel.de> References: <201209170118.25955.andres@anarazel.de> <201209171113.45276.andres@anarazel.de> <201209171315.14458.andres@anarazel.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201209171315.14458.andres@anarazel.de> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2860 Lines: 75 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 wrote: > > > On Monday, September 17, 2012 10:47:10 AM Jerome Glisse wrote: > > >> On Sun, Sep 16, 2012 at 7:18 PM, Andres Freund 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(>t->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 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/