public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Andi Kleen <ak@muc.de>
To: Terence Ripperda <tripperda@nvidia.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: pat support in the kernel
Date: Tue, 20 May 2003 21:10:18 +0200	[thread overview]
Message-ID: <m38yt1igdh.fsf@averell.firstfloor.org> (raw)
In-Reply-To: <20030520190017$773c@gated-at.bofh.it> (Terence Ripperda's message of "Tue, 20 May 2003 21:00:17 +0200")

Terence Ripperda <tripperda@nvidia.com> writes:

> Hello all,
>
> I've discussed adding Page Attribute Table (PAT) support to the kernel w/ a few developers offline. They were very supportive and suggested I bring the discussion to lkml so others could get involved.

change_page_attr() will already do it for the kernel mappings. Just
define a PAGE_KERNEL_WC. Drawback is that it will convert the mapping
to 4K pages (from 2/4MB), but there is probably no alternative unless
all your mappings are 2MB aligned.

But the tricky part of it is that you need to make sure all mappings
to that memory have the same caching attribute, otherwise you invoke
undefined x86 behaviour and risk cache corruptions on some CPUs. 

For the special case of AGP it's quite simple - when an user process maps
the aperture it can just set the correct bits in its own mmap method 
like it already does for uncachable mappings. But for other mappings
it is more difficult. 

For normal memory you would need to find a way to synchronize the
attributes in all mappers (e.g. setting a flag in struct page or
similar). For frame buffer you also need to handle it in all mmap'ers
(like fbcon or /dev/mem). I think handling these generic cases will
need a few VM changes.

[actually even the agp aperture can be accessed using /dev/mem, 
but thats probably unlikely to happen because there is a better interface 
and could be ignored]

-Andi

       reply	other threads:[~2003-05-20 18:57 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20030520190017$773c@gated-at.bofh.it>
2003-05-20 19:10 ` Andi Kleen [this message]
2003-05-20 20:18   ` pat support in the kernel Terence Ripperda, tripperda
2003-05-21  9:33     ` Andi Kleen
2003-05-22 18:23       ` Terence Ripperda, tripperda
     [not found] <20030520185409.GB941@hygelac.suse.lists.linux.kernel>
     [not found] ` <16074.33371.411219.528228@gargle.gargle.HOWL.suse.lists.linux.kernel>
2003-05-21  9:41   ` Andi Kleen
2003-05-21 10:12     ` mikpe
2003-05-21 10:23       ` Andi Kleen
2003-05-20 18:54 Terence Ripperda, tripperda
2003-05-20 19:30 ` mikpe
2003-05-20 20:31   ` Terence Ripperda, tripperda

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=m38yt1igdh.fsf@averell.firstfloor.org \
    --to=ak@muc.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tripperda@nvidia.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