From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932444AbaJ2K3H (ORCPT ); Wed, 29 Oct 2014 06:29:07 -0400 Received: from mail-wi0-f177.google.com ([209.85.212.177]:34019 "EHLO mail-wi0-f177.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932072AbaJ2K3F (ORCPT ); Wed, 29 Oct 2014 06:29:05 -0400 Date: Wed, 29 Oct 2014 11:28:59 +0100 From: Ingo Molnar To: Thomas Gleixner Cc: Juergen Gross , hpa@zytor.com, x86@kernel.org, mingo@redhat.com, stefan.bader@canonical.com, linux-kernel@vger.kernel.org, xen-devel@lists.xensource.com, konrad.wilk@oracle.com, ville.syrjala@linux.intel.com, david.vrabel@citrix.com, jbeulich@suse.com, toshi.kani@hp.com Subject: Re: [PATCH V4 1/3] x86: Make page cache mode a real type Message-ID: <20141029102859.GA11260@gmail.com> References: <1414392513-24645-1-git-send-email-jgross@suse.com> <1414392513-24645-2-git-send-email-jgross@suse.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org * Thomas Gleixner wrote: > On Mon, 27 Oct 2014, Juergen Gross wrote: > > At the moment there are a lot of places that handle setting or getting > > the page cache mode by treating the pgprot bits equal to the cache mode. > > This is only true because there are a lot of assumptions about the setup > > of the PAT MSR. Otherwise the cache type needs to get translated into > > pgprot bits and vice versa. > > > > This patch tries to prepare for that by introducing a separate type > > for the cache mode and adding functions to translate between those and > > pgprot values. > > > > To avoid too much performance penalty the translation between cache mode > > and pgprot values is done via tables which contain the relevant > > information. Write-back cache mode is hard-wired to be 0, all other > > modes are configurable via those tables. For large pages there are > > translation functions as the PAT bit is located at different positions > > in the ptes of 4k and large pages. > > I'm fine with the approach itself. Though I wish you had split this > patch in several sanely to review pieces. > > - Introduce enums, helper functions etc. which basically reflect > the state of today > > - Change the usage sites to use the enums and helpers > > - Convert the enum/helper implementation to the new scheme > > - Split out the printk change > > ... That absolutely has to be done, should any of this introduce regressions. The diffstat: 18 files changed, 344 insertions(+), 212 deletions(-) is _way_ too large. Thanks, Ingo