public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Richard Zidlicky <rz@linux-m68k.org>
To: "Udo A. Steinberg" <us15@os.inf.tu-dresden.de>
Cc: Jeff Dike <jdike@karaya.com>,
	alan@redhat.com, mingo@elte.hu, linux-kernel@vger.kernel.org
Subject: Re: context switch vs. signal delivery [was: Re: Accelerating user mode
Date: Mon, 5 Aug 2002 22:44:15 +0200	[thread overview]
Message-ID: <20020805224415.A579@linux-m68k.org> (raw)
In-Reply-To: <20020805154607.7c021c56.us15@os.inf.tu-dresden.de>; from us15@os.inf.tu-dresden.de on Mon, Aug 05, 2002 at 03:46:07PM +0200

On Mon, Aug 05, 2002 at 03:46:07PM +0200, Udo A. Steinberg wrote:
> On Sat, 03 Aug 2002 10:29:42 -0500
> Jeff Dike <jdike@karaya.com> wrote:
> 
> > alan@redhat.com said:
> > > the alternatives like a seperate process and ptrace are not pretty either
> 
> I have implemented a usermode version of the Fiasco µ-kernel that uses
> a seperate process for the kernel and one process for each task. The kernel
> process attaches to all tasks via ptrace.
> When the kernel wants to change the MM of a task it puts some trampoline code
> on a page mapped into each task's address space and has the task execute that
> code on behalf of the kernel.
> With that setup we have complete address space protection without all the
> trouble of jail at the expense of a few context switches for each mmap, munmap
> or mprotect operation.

very interesting, what is the handiest way to do "syscalls" in this model?
Ptrace is still basically signal driven so I would expect it has still some 
unnecessary overhead?

> I would also very much like an extension that would allow one process to modify
> the MM of another, possibly via an extended ptrace interface or a new syscall.
> Also it would be nice if there was an alternate way to get at the cr2 register,
> trap number and error code other than from a SIGSEGV handler.

that's what signals are for, too bad they are slow.

> > Then, the current UML tracing thread would handle the kernel side of things
> > and sit in its own address space nicely protected from its processes.
> 
> Yes. I already have this part working for our kernel, so it's not just theory.
> I believe things could run yet another bit faster if we didn't have to do the
> trampoline map operations.

they are very expensive because of the way ptrace accesses the other process
memory, did you try a piece of shared memory ?

Richard

  reply	other threads:[~2002-08-05 22:16 UTC|newest]

Thread overview: 48+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-08-01 20:16 Accelerating user mode linux Alan Cox
2002-08-02  4:40 ` Jeff Dike
2002-08-02  9:50   ` Alan Cox
2002-08-02 18:28     ` Jeff Dike
2002-08-02 17:48       ` Alan Cox
2002-08-02 22:33         ` Jeff Dike
2002-08-02 21:57           ` Alan Cox
2002-08-03  0:54             ` Jeff Dike
2002-08-02 11:34   ` Richard Zidlicky
2002-08-02 13:28     ` Alan Cox
2002-08-03 11:38       ` context switch vs. signal delivery [was: Re: Accelerating user mode linux] Ingo Molnar
2002-08-03 12:33         ` context switch vs. signal delivery [was: Re: Accelerating user mode Alan Cox
2002-08-03 15:29           ` Jeff Dike
2002-08-05 13:46             ` Udo A. Steinberg
2002-08-05 20:44               ` Richard Zidlicky [this message]
2002-08-05 22:34                 ` Udo A. Steinberg
2002-08-06  0:42                   ` Jeff Dike
2002-08-06  0:16                     ` Udo A. Steinberg
2002-08-06  2:55                       ` Jeff Dike
2002-08-06  8:10                         ` Udo A. Steinberg
2002-08-06 11:20                           ` Jeff Dike
2002-08-06 11:13                             ` Udo A. Steinberg
2002-08-06 12:53                               ` Jeff Dike
2002-08-06 13:04                                 ` Udo A. Steinberg
2002-08-06 14:12                                   ` Jeff Dike
2002-08-06 16:02                                     ` Udo A. Steinberg
2002-08-06 17:42                                       ` Jeff Dike
2002-08-06 18:01                                         ` Udo A. Steinberg
2002-08-08  1:27                                         ` Udo A. Steinberg
2002-08-08  3:14                                           ` Jeff Dike
2002-08-08  2:21                                             ` Benjamin LaHaise
2002-08-08  9:03                                             ` Udo A. Steinberg
2002-08-08 17:19                                               ` Jeff Dike
2002-08-05 22:06             ` Martin Waitz
2002-08-06  0:49               ` Jeff Dike
2002-08-04  6:46         ` context switch vs. signal delivery [was: Re: Accelerating user mode linux] Andi Kleen
2002-08-05  5:35           ` Linus Torvalds
2002-08-05  5:42             ` Arnaldo Carvalho de Melo
2002-08-05  6:37             ` Lincoln Dale
2002-08-05 15:39             ` Jamie Lokier
2002-08-05 16:38               ` Linus Torvalds
2002-08-05 20:01                 ` context switch vs. signal delivery [was: Re: Accelerating usermode linux] Oliver Neukum
2002-08-05 20:23                   ` Linus Torvalds
2002-08-06  5:31             ` context switch vs. signal delivery [was: Re: Accelerating user mode linux] Mark Mielke
2002-08-05 10:40           ` Ingo Molnar
2002-08-05 14:59             ` Larry McVoy
2002-08-05 15:41             ` Jamie Lokier
2002-08-05 15:44               ` Jamie Lokier

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=20020805224415.A579@linux-m68k.org \
    --to=rz@linux-m68k.org \
    --cc=alan@redhat.com \
    --cc=jdike@karaya.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=us15@os.inf.tu-dresden.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