mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: James Bottomley <James.Bottomley@SteelEye.com>
To: Jeremy Fitzhardinge <jeremy@goop.org>
Cc: linux-arch@vger.kernel.org,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: Which architectures need to sync vmalloc mappings between processes?
Date: Sun, 18 Feb 2007 08:55:31 -0600	[thread overview]
Message-ID: <1171810531.3423.5.camel@mulgrave.il.steeleye.com> (raw)
In-Reply-To: <45D7E438.4020902@goop.org>

On Sat, 2007-02-17 at 21:29 -0800, Jeremy Fitzhardinge wrote:
> I'm looking at making all architectures export a vmalloc_sync_all()
> function, so that generic code can be sure that a particular vmalloc
> mapping is present in all address spaces.   I need this to implement a
> function to reserve a chunk of vmalloc address space complete with
> constructed pagetables, but without allocating any actual data pages.
> 
> On i386 with PAE, this is not necessary because the kernel's mappings
> are shared between all processes anyway, so it would be a no-op.  
> However, non-PAE i386 has a separate kernel mapping for each process,
> and so needs to sync them - typically lazily on faults, but
> vmalloc_sync_all exists to allow mass syncing when required.
> 
> What other architectures would require syncing of vmalloc mappings, and
> what architectures would implement it as a no-op?

Er, but there are fundamental assumptions that vmalloc_sync_all() makes
that simply aren't true on other architectures.  Really, it's an
artifact of the Intel x86 processor's inability to flush by %cr3, so we
try to keep the kernel mappings alive in a process so that a sys call
and return doesn't do a full TLB flush ... and thus, because we have a
hidden piece of kernel in userspace, we get the HIGHMEM issues.

A substantial number of other architectures do have a selective TLB
flush, so a lot operate with a fully separated kernel and user space,
and thus vmalloc mappings appear only in the single kernel address space
and nowhere else.

Could you elaborate on exactly what you think you need
vmalloc_sync_all() exported for ... your explanation of a reserved
vmalloc range sounds reasonable, but should in no way depend on
vmalloc_sync_all().  It really sounds like this should be an arch
specific function so the architectures can decide the implementation
details.

James



  reply	other threads:[~2007-02-18 14:55 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-02-18  5:29 Jeremy Fitzhardinge
2007-02-18 14:55 ` James Bottomley [this message]
2007-02-18 17:08 ` Andi Kleen

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=1171810531.3423.5.camel@mulgrave.il.steeleye.com \
    --to=james.bottomley@steeleye.com \
    --cc=jeremy@goop.org \
    --cc=linux-arch@vger.kernel.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

all inboxes | Powered by JetHome®