public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Terence Ripperda <tripperda@nvidia.com>
To: Andy Whitcroft <apw@shadowen.org>
Cc: Terence Ripperda <tripperda@nvidia.com>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: PAT support
Date: Tue, 13 Apr 2004 11:50:47 -0500	[thread overview]
Message-ID: <20040413165046.GD453@hygelac> (raw)
In-Reply-To: <4680790.1081848973@42.150.104.212.access.eclipse.net.uk>

On Tue, Apr 13, 2004 at 01:36:13AM -0700, apw@shadowen.org wrote:
> But I did notice there appear to be no notes or
> warnings on the issues of using PAT based mappings.  Cirtainly there are
> some _very_ onerus restrictions which I have personally tested and found to
> be true :(.  Perhaps we could get some big fat warning style comments.

where would you like to see such warnings? arguably, all of the dangerous conditions should be handled by this core code to avoid problems (such as only using the first 4 pat entries, flushing the correct caches when updating the pat entries or pte bits). these problems really aren't all that different than any other cache aliasing/pte flushing issues that always exist, right?

> + * According to the INTEL documentation it is the systems responsibility
> + * to ensure that the PAT registers are kept in agreement on all processors
> + * in a system.  Changing these registers must occu in a manner which
> + * maintains the consistency of the processor caches and translation
> + * lookaside buggers (TLB). 

absolutely. I tried to handle this by initializing the pat entries as each cpu comes online at boot time, with cache flushes. I think Andi mentioned flushing the TLBs as well, I'll check up on that to make sure I'm doing that as well.
 
> Also, I have confirmed that if you have any Intel processors which do not
> have the SS (Self Snoop) capability, you cannot have two independent
> mappings to a page with different cache attributes.  I have been hit by
> this and you get stale data returned from the cache.

certainly, that is more or less what this mechanism is intended to prevent. cmap_compare_cachings is an arch-dependent function, which allows architectures to allow/disallow different cache attributes. I certainly consider the current implementation to be a sample that needs some tweaking. for example, I forgot that I had allowed CACHED/NOCACHED overlaps, due to MTRRs that legally overlap like this. but that's probably not a situation we want for any other case, so I need to fix that.

Thanks,
Terence

  reply	other threads:[~2004-04-13 16:52 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-04-12 22:29 PAT support Terence Ripperda
2004-04-13  8:36 ` Andy Whitcroft
2004-04-13 16:50   ` Terence Ripperda [this message]
     [not found] <1KifY-uA-7@gated-at.bofh.it>
2004-04-13  0:01 ` Andi Kleen
2004-04-13 16:21   ` Terence Ripperda
2004-04-14  0:58     ` Andi Kleen
2004-04-16 18:07       ` Terence Ripperda
2004-04-17  0:42         ` Andi Kleen
2004-04-19 22:54           ` Terence Ripperda
2004-04-20 18:51             ` Andi Kleen
2004-04-21 23:19               ` Terence Ripperda
2004-04-22  4:21                 ` Andi Kleen
2004-04-15  4:11   ` Eric W. Biederman
2004-04-15 16:38     ` Andi Kleen
2004-04-15 18:39       ` Eric W. Biederman
  -- strict thread matches above, loose matches on Subject: below --
2004-04-13  5:34 Manfred Spraul
2004-04-13 14:02 ` Pavel Machek
2004-04-13 16:40 ` Terence Ripperda
2004-04-15  4:05 ` Eric W. Biederman
2004-04-15 21:38 Albert Cahalan

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=20040413165046.GD453@hygelac \
    --to=tripperda@nvidia.com \
    --cc=apw@shadowen.org \
    --cc=linux-kernel@vger.kernel.org \
    /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