mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Dave Airlie" <airlied@gmail.com>
To: "Pallipadi, Venkatesh" <venkatesh.pallipadi@intel.com>
Cc: "Ingo Molnar" <mingo@elte.hu>, "Hugh Dickins" <hugh@veritas.com>,
	"Frans Pop" <elendil@planet.nl>,
	"Barnes, Jesse" <jesse.barnes@intel.com>,
	linux-kernel@vger.kernel.org, "Packard,
	Keith" <keith.packard@intel.com>,
	"Yinghai Lu" <yhlu.kernel@gmail.com>,
	"Andrew Morton" <akpm@linux-foundation.org>,
	"Linus Torvalds" <torvalds@linux-foundation.org>,
	"H. Peter Anvin" <hpa@zytor.com>,
	"Thomas Gleixner" <tglx@linutronix.de>,
	"Nick Piggin" <npiggin@suse.de>,
	"Jesse Barnes" <jbarnes@virtuousgeek.org>
Subject: Re: [git head] X86_PAT & mprotect
Date: Sat, 10 May 2008 16:19:27 +1000	[thread overview]
Message-ID: <21d7e9970805092319n1d31be36h2f2c7d46622f46c8@mail.gmail.com> (raw)
In-Reply-To: <924EFEDD5F540B4284297C4DC59F3DEE010471B6@orsmsx423.amr.corp.intel.com>

On Sat, May 10, 2008 at 8:20 AM, Pallipadi, Venkatesh
<venkatesh.pallipadi@intel.com> wrote:
>
>
>
>  >-----Original Message-----
>  >From: Dave Airlie [mailto:airlied@gmail.com]
>  >Sent: Friday, May 09, 2008 3:11 PM
>  >To: Pallipadi, Venkatesh
>  >Cc: Ingo Molnar; Hugh Dickins; Frans Pop; Barnes, Jesse;
>  >linux-kernel@vger.kernel.org; Packard, Keith; Yinghai Lu;
>  >Andrew Morton; Linus Torvalds; H. Peter Anvin; Thomas
>  >Gleixner; Nick Piggin; Jesse Barnes
>  >Subject: Re: [git head] X86_PAT & mprotect
>  >
>  >On Sat, May 10, 2008 at 6:05 AM, Venki Pallipadi
>  ><venkatesh.pallipadi@intel.com> wrote:
>  >> On Fri, May 09, 2008 at 12:08:18PM +0200, Ingo Molnar wrote:
>  >>  >
>  >>  > * Venki Pallipadi <venkatesh.pallipadi@intel.com> wrote:
>  >>  >
>  >>  > > > I've tried doing it slightly differently below, don't
>  >know whether
>  >>  > > > you'll consider it an improvement or not.
>  >>  > >
>  >>  > > Hugh: Thanks for looking into this. Yes. I like your
>  >modified patch.
>  >>  > > Simpler and smaller.
>  >>  >
>  >>  > i have stuck your original patch into testing and nothing
>  >blew up so
>  >>  > far. Due to the mm/ bits this is not for the scope of x86.git, but
>  >>  > obviously it all looks good and is .26-worthy to me:
>  >>  >
>  >>  >  Acked-by: Ingo Molnar <mingo@elte.hu>
>  >>  >  Tested-by: Ingo Molnar <mingo@elte.hu>
>  >>  >
>  >>  > Venki, could you please send a full patch against -git that has
>  >>  > everything from Hugh included, with an updated changelog, for
>  >>  > Linus/Andrew to ack/apply?
>  >>  >
>  >>
>  >>  Ingo,
>  >>
>  >>  Split up the patch into two parts as the pci part was
>  >unrelated to mprotect
>  >>  problem in a sense.
>  >>
>  >>  Here is the first patch.
>  >>
>  >>  Thanks,
>  >>  Venki
>  >>
>  >>
>  >>  Some versions of X used the mprotect workaround to change
>  >caching type from
>  >>
>  >> UC to WB, so that it can then use mtrr to program WC for
>  >that region [1].
>  >>  Change the mmap of pci space through /sys or /proc
>  >interfaces from UC to
>  >>  UC_MINUS. With this change, X will not need to use mprotect
>  >>  workaround to get WC type.
>  >>  Also the bug with mprotect which lets caller to change PAT
>  >bits is fixed in
>  >>  the follow on patch. So, this X workaround will stop
>  >working as well.
>  >>
>  >
>  >Wow this kinda puts X in a nasty position, we have 2.6.25 and
>  >previous kernels
>  >where we use the original /sys interfaces and nasty hack to
>  >workaround, but on 2.6.26 we magically need to
>  >switch to the /sys _uc interfaces or the users X will slow down.
>  >
>
>  No. With 2.6.26 you can still use same /sys resource file, without
>  the mprotect workaround and set the MTRR as before.
>
>  The change from UC to UC_MINUS in this patch ensures that the
>  X drivers MTRR will take precedence and X does not need any mprotect
>  hacks.
>

Cool just making sure.

Keithp, I hope we didn't error check the mremap return values :)

Dave.

  reply	other threads:[~2008-05-10  6:19 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-05-02 19:22 [git head] Should X86_PAT really default to yes? Frans Pop
2008-05-02 19:37 ` Pallipadi, Venkatesh
2008-05-02 20:40   ` Jesse Barnes
2008-05-02 21:55     ` Pallipadi, Venkatesh
2008-05-02 22:07       ` Jesse Barnes
2008-05-04  7:10     ` Frans Pop
2008-05-04  9:04       ` Ingo Molnar
2008-05-04 20:23       ` Yinghai Lu
2008-05-05 16:55         ` Frans Pop
2008-05-05 17:00           ` Pallipadi, Venkatesh
2008-05-05 17:42             ` Yinghai Lu
2008-05-05 18:56             ` Frans Pop
2008-05-05 15:57       ` Jesse Barnes
2008-05-05 17:32         ` Frans Pop
2008-05-05 17:45           ` Jesse Barnes
2008-05-05 17:59             ` Pallipadi, Venkatesh
2008-05-05 18:59             ` Frans Pop
2008-05-05 19:04               ` fb layer & ioremap_wc Jesse Barnes
2008-06-13 16:42                 ` Frans Pop
2008-05-06 22:42           ` [git head] Should X86_PAT really default to yes? Venki Pallipadi
2008-05-07  7:02             ` [git head] X86_PAT & mprotect Ingo Molnar
2008-05-07 19:18               ` Hugh Dickins
2008-05-07 23:23                 ` Venki Pallipadi
2008-05-09 10:08                   ` Ingo Molnar
2008-05-09 20:05                     ` Venki Pallipadi
2008-05-09 20:09                       ` Venki Pallipadi
2008-05-09 20:48                         ` Hugh Dickins
2008-05-09 22:11                       ` Dave Airlie
2008-05-09 22:20                         ` Pallipadi, Venkatesh
2008-05-10  6:19                           ` Dave Airlie [this message]
2008-05-10  6:29                             ` Keith Packard
2008-05-10  5:45                         ` Keith Packard
2008-05-07 22:36               ` Venki Pallipadi
2008-05-25 15:08             ` [git head] Should X86_PAT really default to yes? Frans Pop

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=21d7e9970805092319n1d31be36h2f2c7d46622f46c8@mail.gmail.com \
    --to=airlied@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=elendil@planet.nl \
    --cc=hpa@zytor.com \
    --cc=hugh@veritas.com \
    --cc=jbarnes@virtuousgeek.org \
    --cc=jesse.barnes@intel.com \
    --cc=keith.packard@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=npiggin@suse.de \
    --cc=tglx@linutronix.de \
    --cc=torvalds@linux-foundation.org \
    --cc=venkatesh.pallipadi@intel.com \
    --cc=yhlu.kernel@gmail.com \
    /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

all inboxes | Powered by JetHome®