All of lore.kernel.org
 help / color / mirror / Atom feed
From: James Bottomley <James.Bottomley@SteelEye.com>
To: Grant Grundler <grundler@parisc-linux.org>
Cc: John David Anglin <dave@hiauly1.hia.nrc.ca>,
	Thibaut VARENE <T-Bone@parisc-linux.org>,
	parisc-linux <parisc-linux@lists.parisc-linux.org>,
	Matthew Wilcox <matthew@wil.cx>
Subject: Re: [parisc-linux] The problem on the PA8800 is all in the data-cache.
Date: Wed, 26 Jul 2006 16:54:39 -0500	[thread overview]
Message-ID: <1153950879.3446.49.camel@mulgrave.il.steeleye.com> (raw)
In-Reply-To: <20060725220235.GB28294@colo.lackof.org>

On Tue, 2006-07-25 at 16:02 -0600, Grant Grundler wrote:
> You misheard. I'll be poking at this again in the near future.
> I've gotten the code to modify diag registers done.
> I just need to test the L2 disable and write a wrapper that
> does the necessary I/D cache flushing.

Actually, I found a different way to prove the theory.

In linux, we're careful about sequential accesses to memory (i.e. only
the user or the kernel may touch a page) to avoid the dirty line
aliasing which bites on all architectures.  However, the kernel takes
this care in almost every place, principally because we don't
necessarily know if the user line is dirty or not.  Thus it's possible
to use this guarantee to make the kernel fully equivalently mapped.

The primary engine of this guarantee is the kmap/kunmap (also _atomic).
When we come into a kmap region, we're guaranteed that the user mappings
have been flushed, so really all we have to do is flush the kernel
mappings when we leave.

This flush kernel mapping is a simple two line addition to highmem.h and
with it (as demonstration code), the pa8800 works reliably.

This fix is a gross O(1) one.  There will still be O(2) regions where
this guarantee needs to be fixed up independent of kmap/kunmap.
However, the O(1) fix gets pa8800 to the point where sshd works and we
get only the occasional segfault (I've only found one so far in an hour
of stress testing).

The other thing that will be contributing to O(2) effects is cache
movein.  Even though we flush the page, the CPU is entitled to move it
back into cache if it finds a TLB entry, so we have to begin purging the
TLB entries as we do this as well.

The final problem (once we have the O(2) effects all sorted) will be to
get this upstream.  The kmap API is supposed not to care about coherence
effects, now I'm making it, so I can sell this to the arch maintainers
as eliminating a lot of the kmap/flush_kernel_dcache_page/kunmap that we
do today ... I hope.

James



_______________________________________________
parisc-linux mailing list
parisc-linux@lists.parisc-linux.org
http://lists.parisc-linux.org/mailman/listinfo/parisc-linux

  reply	other threads:[~2006-07-26 21:54 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-07-22 17:50 [parisc-linux] The problem on the PA8800 is all in the data-cache Carlos O'Donell
2006-07-23  1:01 ` Thibaut VARENE
2006-07-23 16:28   ` Michael S. Zick
2006-07-23 22:03     ` Thibaut VARENE
2006-07-24  1:40       ` Kyle McMartin
2006-07-24  2:39         ` Thibaut VARENE
2006-07-24  2:33 ` James Bottomley
2006-07-24  2:54   ` Thibaut VARENE
2006-07-24  3:32     ` Matthew Wilcox
2006-07-24  4:15       ` Thibaut VARENE
     [not found]         ` <1153750204.1235.18.camel@mulgrave.il.steeleye.com>
2006-07-24 16:32           ` Grant Grundler
2006-07-25 14:51             ` James Bottomley
2006-07-25 16:13               ` John David Anglin
2006-07-25 16:17                 ` James Bottomley
2006-07-25 16:46                   ` Kyle McMartin
2006-07-25 22:02                   ` Grant Grundler
2006-07-26 21:54                     ` James Bottomley [this message]
2006-07-25 16:34               ` Thibaut VARENE
2006-07-25 16:37                 ` Thibaut VARENE
2006-07-24 14:58       ` John David Anglin
     [not found]     ` <1153711459.1235.13.camel@mulgrave.il.steeleye.com>
2006-07-24  4:26       ` Thibaut VARENE
2006-07-24  4:31         ` Thibaut VARENE
2006-07-24 14:51   ` James Bottomley

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=1153950879.3446.49.camel@mulgrave.il.steeleye.com \
    --to=james.bottomley@steeleye.com \
    --cc=T-Bone@parisc-linux.org \
    --cc=dave@hiauly1.hia.nrc.ca \
    --cc=grundler@parisc-linux.org \
    --cc=matthew@wil.cx \
    --cc=parisc-linux@lists.parisc-linux.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.