Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933676AbbDURgB (ORCPT ); Tue, 21 Apr 2015 13:36:01 -0400 Received: from cantor2.suse.de ([195.135.220.15]:38407 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932554AbbDURf5 (ORCPT ); Tue, 21 Apr 2015 13:35:57 -0400 Date: Tue, 21 Apr 2015 19:35:53 +0200 From: "Luis R. Rodriguez" To: Andy Lutomirski Cc: Andy Walls , Toshi Kani , "H. Peter Anvin" , Ingo Molnar , "linux-kernel@vger.kernel.org" , Hal Rosenstock , Sean Hefty , Suresh Siddha , Rickard Strandqvist , Mike Marciniszyn , Roland Dreier , Juergen Gross , Mauro Carvalho Chehab , Borislav Petkov , Mel Gorman , Vlastimil Babka , Davidlohr Bueso , Dave Hansen , Jean-Christophe Plagniol-Villard , Thomas Gleixner , Ville =?iso-8859-1?Q?Syrj=E4l=E4?= , Linux Fbdev development list , linux-media@vger.kernel.org, X86 ML , Greg Kroah-Hartman , mcgrof@do-not-panic.com Subject: Re: ioremap_uc() followed by set_memory_wc() - burrying MTRR Message-ID: <20150421173553.GM5622@wotan.suse.de> References: <20150410210538.GB5622@wotan.suse.de> <1428699490.21794.5.camel@misato.fc.hp.com> <20150411012938.GC5622@wotan.suse.de> <20150413174938.GE5622@wotan.suse.de> <1429137531.1899.28.camel@palomino.walls.org> <1429142387.1899.57.camel@palomino.walls.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 3108 Lines: 68 On Wed, Apr 15, 2015 at 05:58:14PM -0700, Andy Lutomirski wrote: > On Wed, Apr 15, 2015 at 4:59 PM, Andy Walls wrote: > > On Wed, 2015-04-15 at 16:42 -0700, Andy Lutomirski wrote: > >> On Wed, Apr 15, 2015 at 3:38 PM, Andy Walls wrote: > > > >> > > >> > >> IMO the right solution would be to avoid ioremapping the whole bar at > >> startup. Instead ioremap pieces once the driver learns what they are. > >> This wouldn't have any of these problems -- you'd ioremap() register > >> regions and you'd ioremap_wc() the framebuffer once you find it. If > >> there are regions of unknown purpose, just don't map them all. > >> > >> Would this be feasible? > > > > Feasible? Maybe. > > > > Worth the time and effort for end-of-life, convential PCI hardware so I > > can have an optimally performing X display on a Standard Def Analog TV > > screen? Nope. I don't have that level of nostalgia. > > > > The point is actually to let us unexport or delete mtrr_add. We can > either severely regress performance on ivtv on PAT-capable hardware if > we naively switch it to arch_phys_wc_add or we can do something else. > The something else remains to be determined. Back to square one: I can't come up with anything not too instrusive or that dotes not requires substantial amount of work as an alternative to removing MTRR completely right now (with the long term goal of also making strong UC default) and its because of 2 device drivers: * ivtv: firmware API is poo and device is legacy, no one cares * ipath: driver needs a clean split and work is considerable, maintainers have not been responsive, do they care? What do we want to do with these drivers? Let us be straight shooters, if we are serious about having a performance regression on the drivers for the sake of removing MTRR why not just seriously discuss removal of these drivers. This way we can remain sane, upkeep a policy to never even consider overlapping ioremap*() calls, and have a clean expected strategy we can expect for new drivers. I'm going to split up my patches now into 4 series: 1) things which are straight forward in converting drivers over to arch_phys_wc_add() and ioremap_wc(). These are subsystem wide though, so just a heads up, my hope is that each subsystem maintainer can take their own series unless someone else is comfortable in taking this in for x86 2) a few helpers in the like of ioremap_wc() needed for other drivers. These are straight forward but since they depend on x86 / core helpers it would be nice for them to go I guess through x86 folks. What maintainer is up to take these? 3) MTRR run time changes 4) corner cases - TBD - lets discuss here what we want to do with ivtv and ipath. I will however remove fusion's mtrr code use as its all commented out. Luis -- 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/