public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Jeremy Fitzhardinge <jeremy@goop.org>
To: Nick Piggin <npiggin@suse.de>
Cc: Linux Memory Management List <linux-mm@kvack.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [rfc][patch] mm: vmap rewrite
Date: Wed, 11 Jun 2008 19:46:20 +0100	[thread overview]
Message-ID: <48501D7C.5050600@goop.org> (raw)
In-Reply-To: <20080610025312.GC19404@wotan.suse.de>

Nick Piggin wrote:
> It's harder than that even, because we don't own the page flags, so then
> clearing the PG_kalias bit would require that we make all page flags ops
> atomic in all parts of the kernel. Obviously not going to happen.
>
> The other thing we could do is have vmap layer keep some p->v translations
> around (actually it doesn't even need to go all the way to v, just a single
> bit would suffice) So I guess this would be like another page flag, but
> without the atomicity problem and without me getting angry at using another
> flag ;) Still, I'd rather not do this and slow everything else down.
>   

Yeah.  It's a bit awkward to maintain a secondary structure just to deal 
with the confluence of two edge cases (running Xen + reusing an aliased 
page in a pagetable).

> It could be switched on at runtime if Xen is running perhaps. Or the other
> thing Xen could do is keep a cache of unaliased page table pages. You
> could fill it up N pages at a time, and just do a single unmap_aliases call
> to sanitize them all; also, clean pages returned from pagetables could be
> reused. Like the quicklists things.
>   

Hm, that wouldn't be too bad (so long as it doesn't end up hiding 
gigabytes of memory away from the rest of the system ;).

> Or: doesn't the host have to do its own alias check anyway? In case of an
> AWOL guest? Why not just reuse that and trap back into the guest to fix it
> up?

That's possible, but awkward.  In many cases these updates will be 
batched, so it would become a matter of issuing a batch, then picking 
through the results to see what worked and what failed.  I suppose I 
could just do the simple flush and then if that turns out too expensive, 
do the submit-and-retry approach.

    J

  reply	other threads:[~2008-06-11 18:47 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-06-05 10:20 [rfc][patch] mm: vmap rewrite Nick Piggin
2008-06-06  7:17 ` Jiri Slaby
2008-06-10  3:45   ` Nick Piggin
2008-06-07 17:38 ` Jeremy Fitzhardinge
2008-06-10  2:53   ` Nick Piggin
2008-06-11 18:46     ` Jeremy Fitzhardinge [this message]
2008-06-12  1:22       ` Nick Piggin
2008-06-12 20:18   ` [rfc][patch] mm: vmap rewrite #2 Nick Piggin

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=48501D7C.5050600@goop.org \
    --to=jeremy@goop.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=npiggin@suse.de \
    /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