All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Ky Srinivasan" <ksrinivasan@novell.com>
To: Keir Fraser <Keir.Fraser@cl.cam.ac.uk>
Cc: xen-devel@lists.xensource.com
Subject: Re: context switch
Date: Tue, 28 Mar 2006 19:44:00 -0500	[thread overview]
Message-ID: <442991FF.E57C.0030.0@novell.com> (raw)
In-Reply-To: <af304b148f305da9c9b21ff4622322a3@cl.cam.ac.uk>



>>> On Tue, Mar 28, 2006 at 12:40 pm, in message
<af304b148f305da9c9b21ff4622322a3@cl.cam.ac.uk>, Keir Fraser
<Keir.Fraser@cl.cam.ac.uk> wrote: 

> On 28 Mar 2006, at 18:33, Ky Srinivasan wrote:
> 
>>  Looking more at the generic Linux CS code, saving the selector
values
>> of the outgoing context and setting the segment registers values to

>> zero
>> in prepare_arch_switch() we think deals with the problem I have
listed
>> below (thanks to Jan for pointing this out).
> 
> That's what our own trees do already.
> 
>> While this expensive trick
>> may solve this problem, a simpler solution perhaps might be to have
an
>> efficient  mechanism for the guest to manage hypervisor
preemptions.
> 
> Why is it expensive? The updates to zero only happen if the previous

> selector value was non- zero, which is usually not the case for 64-
bit 
> apps.

The expense I was referring to is the selector loads (to zero them
out).  The prepare_arch_switch() is also used on the 32 bit side as well
(for fs and gs).


> 
> Things should work okay even without the zeroing, by the way. It just

> avoids an unnecessary failsafe callback into the guest kernel. I
fixed 
> the failsafe handler for x86/64 earlier today.
> 
>   --  Keir

K. Y

      parent reply	other threads:[~2006-03-29  0:44 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <44284B8E.E57C.0030.0@novell.com>
2006-03-28 16:31 ` context switch Ky Srinivasan
2006-03-28 17:33   ` Ky Srinivasan
2006-03-28 17:40     ` Keir Fraser
2006-03-28 19:35       ` Keir Fraser
2006-03-28 20:56         ` Keir Fraser
2006-03-29  0:49           ` Ky Srinivasan
2006-03-29  9:06             ` Keir Fraser
2006-03-29  0:44       ` Ky Srinivasan [this message]

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=442991FF.E57C.0030.0@novell.com \
    --to=ksrinivasan@novell.com \
    --cc=Keir.Fraser@cl.cam.ac.uk \
    --cc=xen-devel@lists.xensource.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.