public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Jeff Dike <jdike@karaya.com>
To: Alan Cox <alan@redhat.com>, linux-kernel@vger.kernel.org
Subject: Re: Accelerating user mode linux
Date: Thu, 01 Aug 2002 23:40:28 -0500	[thread overview]
Message-ID: <200208020440.XAA04793@ccure.karaya.com> (raw)
In-Reply-To: Your message of "Thu, 01 Aug 2002 16:16:58 -0400." <200208012016.g71KGwK27981@devserv.devel.redhat.com>

alan@redhat.com said:
> We add
> 	sys_switchmm(address);
> This switches to the altmm (creating one if it doesnt exist as a copy
> of the current mm), flushes the tlb and jumps to the address given. 

You didn't explicitly say (and so I had to ask :-) that this is intended
to be the mechanism by which UML returns to userspace, rather than the
normal sigreturn you'd get by just returning from the handler.

So, this would make the entry to userspace look like:
	restore registers
		.
		.
		.
	sys_switchmm(ip);

The problem with this is that it needs to be atomic wrt signals.  There
can't be an interrupt in the middle of that sequence.  So, sys_switchmm
would also have to restore the old signal mask, which you'd have to pass
in unless you're going to read it off the signal frame.  Also, it would
have to be open coded because you've already restored the stack pointer.

So, the entry to userspace starts looking like:
	block signals
	restore registers
	sys_switchmm(ip, new_sigmask);

Well, except for the blocking signals part, this is sigreturn under a 
different name and partly moved into userspace.  

Your objection to returning through sigreturn was performance.  Is performance
a veto of adding an mm switch to sigreturn, or it is possible to make it
acceptible?

Also, is a new sigreturn_mm() reasonable?  This would be close to sys_switchmm,
except that it would restore registers and would be a plug replacement for
sigreturn[_rt].  I don't favor this because it would probably have to choose 
whether to be an _rt return or not, and I'd like the option of having UML 
register some signals as SA_INFO (currently, they are all non SA_INFO).

Comments, brickbats, spanners?

				Jeff


  reply	other threads:[~2002-08-02  3:34 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 [this message]
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
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=200208020440.XAA04793@ccure.karaya.com \
    --to=jdike@karaya.com \
    --cc=alan@redhat.com \
    --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