public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Toshi Kani <toshi.kani@hp.com>
To: Jan Beulich <JBeulich@suse.com>
Cc: Juergen Gross <JGross@suse.com>,
	stefan.bader@canonical.com, x86@kernel.org,
	ville.syrjala@linux.intel.com, xen-devel@lists.xensource.com,
	linux-kernel@vger.kernel.org, hpa@zytor.com
Subject: Re: [Xen-devel] [PATCH RFC 1/3] x86: Make page cache mode a real type
Date: Fri, 22 Aug 2014 11:43:07 -0600	[thread overview]
Message-ID: <1408729387.28990.85.camel@misato.fc.hp.com> (raw)
In-Reply-To: <53F72856020000780002C93D@mail.emea.novell.com>

On Fri, 2014-08-22 at 10:24 +0100, Jan Beulich wrote:
> >>> On 21.08.14 at 11:30, <JGross@suse.com> wrote:
> > On 08/20/2014 09:26 PM, Toshi Kani wrote:
> >> On Tue, 2014-08-19 at 15:25 +0200, jgross@suse.com wrote:
> >>> --- a/arch/x86/mm/init.c
> >>> +++ b/arch/x86/mm/init.c
> >>> @@ -27,6 +27,35 @@
> >>>
> >>>   #include "mm_internal.h"
> >>>
> >>> +/*
> >>> + * Tables translating between page_cache_type_t and pte encoding.
> >>> + * Minimal supported modes are defined statically, modified if more supported
> >>> + * cache modes are available.
> >>> + * Index into __cachemode2pte_tbl is the cachemode.
> >>> + * Index into __pte2cachemode_tbl are the caching attribute bits of the pte
> >>> + * (_PAGE_PWT, _PAGE_PCD, _PAGE_PAT) at index bit positions 0, 1, 2.
> >>> + */
> >>> +uint16_t __cachemode2pte_tbl[_PAGE_CACHE_MODE_NUM] = {
> >>> +	[_PAGE_CACHE_MODE_WB]		= 0,
> >>> +	[_PAGE_CACHE_MODE_WC]		= _PAGE_PWT,
> >>> +	[_PAGE_CACHE_MODE_UC_MINUS]	= _PAGE_PCD,
> >>> +	[_PAGE_CACHE_MODE_UC]		= _PAGE_PCD | _PAGE_PWT,
> >>> +	[_PAGE_CACHE_MODE_WT]		= _PAGE_PWT,
> >>> +	[_PAGE_CACHE_MODE_WP]		= _PAGE_PWT,
> >>> +};
> >>
> >> I think WT and WP should be set to _PAGE_PCD (UC_MINUS) for safe.
> > 
> > Oh, you are right.
> 
> Actually I suppose the original comment was about WC and WP;
> defaulting WT to _PAGE_PWT seems quite correct to me.

My comment was about WT and WP, whose cache modes are defined here but
are not supported in this patchset.  _PAGE_PWT is used by WC, which has
weakly ordered writes.  WT and WP have strongly ordered writes, so they
should be redirected to UC- for safe.

Thanks,
-Toshi


  reply	other threads:[~2014-08-22 17:53 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-19 13:25 [PATCH RFC 0/3] x86: Full support of PAT jgross
2014-08-19 13:25 ` [PATCH RFC 1/3] x86: Make page cache mode a real type jgross
2014-08-20 19:26   ` Toshi Kani
2014-08-21  9:30     ` [Xen-devel] " Juergen Gross
2014-08-22  9:24       ` Jan Beulich
2014-08-22 17:43         ` Toshi Kani [this message]
2014-08-21 22:09   ` Toshi Kani
2014-08-22  5:25     ` Juergen Gross
2014-08-19 13:25 ` [PATCH RFC 2/3] x86: Enable PAT to use cache mode translation tables jgross
2014-08-22  9:32   ` [Xen-devel] " Jan Beulich
2014-08-25 12:22     ` Juergen Gross
2014-08-19 13:25 ` [PATCH RFC 3/3] Support Xen pv-domains using PAT jgross
2014-08-20 12:05 ` [PATCH RFC 0/3] x86: Full support of PAT One Thousand Gnomes
2014-08-20 12:21   ` [Xen-devel] " Jan Beulich
2014-08-20 22:00     ` H. Peter Anvin
2014-08-20 12:35   ` Juergen Gross
2014-08-20 21:59   ` H. Peter Anvin

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=1408729387.28990.85.camel@misato.fc.hp.com \
    --to=toshi.kani@hp.com \
    --cc=JBeulich@suse.com \
    --cc=JGross@suse.com \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=stefan.bader@canonical.com \
    --cc=ville.syrjala@linux.intel.com \
    --cc=x86@kernel.org \
    --cc=xen-devel@lists.xensource.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