public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Ralf Baechle <ralf@uni-koblenz.de>
To: ebiederm@xmission.com (Eric W. Biederman)
Cc: David Weinehall <tao@acc.umu.se>,
	Alan Cox <alan@lxorguk.ukuu.org.uk>,
	Linus Torvalds <torvalds@transmeta.com>,
	Andrea Arcangeli <andrea@suse.de>,
	David Woodhouse <dwmw2@infradead.org>,
	Zlatko Calusic <zlatko@iskon.hr>,
	Rik van Riel <riel@conectiva.com.br>,
	linux-kernel@vger.kernel.org
Subject: Re: Subtle MM bug
Date: Mon, 15 Jan 2001 00:53:15 -0200	[thread overview]
Message-ID: <20010115005315.D1656@bacchus.dhis.org> (raw)
In-Reply-To: <Pine.LNX.4.10.10101101100001.4457-100000@penguin.transmeta.com> <E14GR38-0000nM-00@the-village.bc.nu> <20010111005657.B2243@khan.acc.umu.se> <20010112035620.B1254@bacchus.dhis.org> <m17l40hhtd.fsf@frodo.biederman.org>
In-Reply-To: <m17l40hhtd.fsf@frodo.biederman.org>; from ebiederm@xmission.com on Fri, Jan 12, 2001 at 09:10:54AM -0700

On Fri, Jan 12, 2001 at 09:10:54AM -0700, Eric W. Biederman wrote:

> > Having a reverse mappings is the least sucky way to handle virtual aliases
> > of certain types of MIPS caches.
> 
> Hmm.  I would think that increasing the logical page size in the kernel would
> be the trivial way to handle virtual aliases.  (i.e.) with a large enough page
> size you can't actually have a virtual alias.

That's a possible solution; I'm not clear how bad the overhead would be.
Right now a virtual alias is a relativly rare event and we don't want the
common case of no virtual alias to make pay a high price.  Or?

> You could also play some games with simply allocating pages only with the
> proper proper high bits.   These games might also be useful on architectures
> for L2 caches who have significant physical bits than PAGE_SHIFT bits.

An alternative but less efficient solution.  I tried to implement it; I ran
into problems with running out of larger pages soon as I had to split order 2
pages into 4 order 0 pages to implement this; the fragmentation was _really_
bad.

> But how does a reverse mapping help to handle virtual aliases?  What are those
> caches doing?

You leave only mappings of one color accessible.  All other mappings are made
unaccessible in the page table, so accessing will result in a TLB fault.
The TLB fault handler then flushes the active mappings, makes them
unaccessible by clearing the MIPS hw dirty / accessible bits, then makes the
mapping of the new color accessible in the page table.  This is already
possible right now but doing the necessary reverse mappings can be rather
inefficient as is.

> The only model in my head is having a virtually indexed cache where you
> have more index bits than PAGE_SHIFT bits.

Which is exactly what many MIPS implementations are suffering from.  At
least they're tagged with the physical address, so no flushes on context
switch necessary.

  Ralf

--
"Embrace, Enhance, Eliminate" - it worked for the pope, it'll work for Bill.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

  parent reply	other threads:[~2001-01-15  2:54 UTC|newest]

Thread overview: 95+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-01-08  5:29 Subtle MM bug Wayne Whitney
2001-01-08  5:42 ` Andi Kleen
2001-01-08  6:04   ` Linus Torvalds
2001-01-08 17:44     ` Rik van Riel
2001-01-08 18:02       ` Linus Torvalds
2001-01-08 17:16 ` Rik van Riel
2001-01-08 17:58   ` Linus Torvalds
2001-01-08 23:41     ` Zlatko Calusic
2001-01-09  2:58       ` Linus Torvalds
2001-01-09  6:20       ` Eric W. Biederman
2001-01-09  7:27         ` Linus Torvalds
2001-01-09 11:38           ` Eric W. Biederman
2001-01-09 12:29           ` Zlatko Calusic
2001-01-09 18:47             ` Linus Torvalds
2001-01-09 19:09               ` Daniel Phillips
2001-01-09 19:29                 ` Trond Myklebust
2001-01-10 17:32                   ` Andi Kleen
2001-01-10 19:31                     ` Alan Cox
2001-01-10 19:33                       ` Andi Kleen
2001-01-10 19:40                         ` Alan Cox
2001-01-10 19:43                           ` Andi Kleen
2001-01-10 19:48                             ` Alan Cox
2001-01-10 19:48                               ` Andi Kleen
2001-01-11  9:51                               ` Trond Myklebust
2001-01-10 20:11                       ` Linus Torvalds
2001-01-11 12:56                         ` Stephen C. Tweedie
2001-01-11 13:10                           ` Andi Kleen
2001-01-11 13:12                           ` Trond Myklebust
2001-01-11 14:13                             ` Stephen C. Tweedie
2001-01-11 19:03                               ` Alexander Viro
2001-01-11 19:47                                 ` Stephen C. Tweedie
2001-01-11 19:57                                   ` Alexander Viro
2001-01-11 16:50                           ` Albert D. Cahalan
2001-01-11 17:35                             ` Stephen C. Tweedie
2001-01-11 19:38                               ` Albert D. Cahalan
2001-01-11 19:01                           ` Alexander Viro
2001-01-09 19:37                 ` Linus Torvalds
2001-01-17  8:46                 ` Rik van Riel
2001-01-25 22:51                   ` Daniel Phillips
2001-01-09 19:53               ` Simon Kirby
2001-01-09 20:08                 ` Linus Torvalds
2001-01-09 20:10                 ` Zlatko Calusic
2001-01-10  1:45               ` David Woodhouse
2001-01-10  2:26                 ` Andrea Arcangeli
2001-01-10  6:57                 ` Linus Torvalds
2001-01-10 11:46                   ` David Woodhouse
2001-01-10 14:56                     ` Andrea Arcangeli
2001-01-10 17:46                       ` Eric W. Biederman
2001-01-10 18:33                         ` Andrea Arcangeli
2001-01-17 14:26                           ` Rik van Riel
2001-01-10 19:03                         ` Linus Torvalds
2001-01-10 19:27                           ` David S. Miller
2001-01-10 19:36                           ` Alan Cox
2001-01-10 23:56                             ` David Weinehall
2001-01-11  0:24                               ` Alan Cox
2001-01-12  5:56                               ` Ralf Baechle
2001-01-12 16:10                                 ` Eric W. Biederman
2001-01-12 21:11                                   ` Russell King
2001-01-15  2:56                                     ` Ralf Baechle
2001-01-15  6:59                                       ` Eric W. Biederman
2001-01-15  2:53                                   ` Ralf Baechle [this message]
2001-01-15  8:41                                     ` Caches, page coloring, virtual indexed caches, and more Eric W. Biederman
2001-01-15 11:54                                       ` Ralf Baechle
2001-01-15 12:53                                         ` Anton Blanchard
2001-01-15 17:41                                           ` Ralf Baechle
2001-01-17  4:36                                             ` Anton Blanchard
2001-01-16  9:34                                           ` Eric W. Biederman
2001-01-17  4:43                                             ` Anton Blanchard
2001-01-17  8:35                                               ` Eric W. Biederman
2001-01-15 17:16                                         ` Eric W. Biederman
2001-01-16  4:58                                           ` Ralf Baechle
2001-01-15 18:22                                         ` Jamie Lokier
2001-01-15 12:51                                       ` Anton Blanchard
2001-01-17 14:28                           ` Subtle MM bug Rik van Riel
2001-01-18  1:23                             ` Linus Torvalds
2001-01-18 11:48                               ` Rik van Riel
2001-01-10 17:03                     ` Linus Torvalds
2001-01-11 14:36                       ` Jim Gettys
2001-01-08 21:30   ` Wayne Whitney
  -- strict thread matches above, loose matches on Subject: below --
2001-01-10 19:57 Chris Wing
2001-01-08 20:39 Szabolcs Szakacsits
2001-01-08 21:56 ` Wayne Whitney
2001-01-08 23:22   ` Wayne Whitney
2001-01-08 23:30     ` Andrea Arcangeli
2001-01-09  0:37       ` Linus Torvalds
2001-01-08 22:00 ` Wayne Whitney
2001-01-08 22:15   ` Andrea Arcangeli
2001-01-07 20:59 Zlatko Calusic
2001-01-07 21:37 ` Rik van Riel
2001-01-07 22:33   ` Zlatko Calusic
2001-01-09  2:01   ` Zlatko Calusic
2001-01-17  4:48     ` Rik van Riel
2001-01-17 18:53       ` Zlatko Calusic
2001-01-18  1:32         ` Rik van Riel
2001-04-17 19:37           ` 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=20010115005315.D1656@bacchus.dhis.org \
    --to=ralf@uni-koblenz.de \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=andrea@suse.de \
    --cc=dwmw2@infradead.org \
    --cc=ebiederm@xmission.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=riel@conectiva.com.br \
    --cc=tao@acc.umu.se \
    --cc=torvalds@transmeta.com \
    --cc=zlatko@iskon.hr \
    /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