From: Zachary Amsden <zach@vmware.com>
To: Keir Fraser <Keir.Fraser@cl.cam.ac.uk>
Cc: Chris Wright <chrisw@sous-sol.org>,
Xen-devel <xen-devel@lists.xensource.com>,
Wim Coekaerts <wim.coekaerts@oracle.com>,
Christopher Li <chrisl@vmware.com>,
Jan Beulich <jbeulich@novell.com>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
virtualization@lists.osdl.org, Linus Torvalds <torvalds@osdl.org>,
Kip Macy <kmacy@fsmware.com>, Jyothy Reddy <jreddy@vmware.com>,
Anne Holler <anne@vmware.com>,
Ky Srinivasan <ksrinivasan@novell.com>,
Leendert van Doorn <leendert@watson.ibm.com>
Subject: Re: [Xen-devel] Re: [RFC, PATCH 5/24] i386 Vmi code patching
Date: Thu, 23 Mar 2006 10:50:58 -0800 [thread overview]
Message-ID: <4422EE12.7060908@vmware.com> (raw)
In-Reply-To: <caf37c433827769063ccb0269adbaa09@cl.cam.ac.uk>
Keir Fraser wrote:
>>
>> Yeah, point is the interface is normal C API, and has the similar free
>> form that normal kernel API's have.
>
> i think this sounds very sane, and an OS-specific interface shim gets
> around problems such as finding CPU-specific state -- we can get at
> smp_processor_id() just the same as the rest of the kernel, for
> example. We could extend the concept of the interface shim we already
> have -- a set of OS-specific high performance shims, plus a fallback
> OS-agnostic shim.
Getting at smp_processor_id() is exactly the type of thing you _don't_
want to do. You really can't have callbacks into the guest in the
hypervisor platform layer. It really is not efficient, and you cause
yourself more trouble than it is worth.
And where exactly is smp_processor_id() exported to modules? It's not.
You've just locked your module into the current kernel's idea of how to
get at smp_processor_id(). It changes based on compilation options of
the kernel - for example, it is different with 4K stacks. It has
changed from a number of other different options in the past.
The fact that XenoLinux needs smp_processor_id() at all is quite
ludicrous. To disable interrupts, which is used fairly commonly to
disable pre-emption as well, what does XenoLinux have to do?
It has to disable pre-emption to call smp_processor_id() so that it can
disable interrupts, the re-enable preemption so that it can disable
pre-emption.
That is truly convoluted, and is exactly why you should never get into
these types of situations to begin with.
Zach
next prev parent reply other threads:[~2006-03-23 18:51 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-03-13 18:02 [RFC, PATCH 5/24] i386 Vmi code patching Zachary Amsden
2006-03-15 10:02 ` Chris Wright
2006-03-15 16:01 ` Zachary Amsden
2006-03-15 22:05 ` Anthony Liguori
2006-03-15 23:00 ` Pavel Machek
2006-03-17 0:51 ` Zachary Amsden
2006-03-17 10:08 ` Joshua LeVasseur
2006-03-17 21:11 ` Chris Wright
2006-03-18 0:49 ` Joshua LeVasseur
2006-03-16 19:10 ` Jan Engelhardt
2006-03-16 19:45 ` Rik van Riel
2006-03-16 21:54 ` Zachary Amsden
2006-03-22 20:15 ` Andi Kleen
2006-03-22 21:40 ` Chris Wright
2006-03-22 22:16 ` Zachary Amsden
2006-03-22 22:33 ` Daniel Arai
2006-03-22 23:02 ` Chris Wright
2006-03-22 22:51 ` Chris Wright
2006-03-22 23:36 ` Zachary Amsden
2006-03-23 0:41 ` Chris Wright
2006-03-23 0:54 ` Zachary Amsden
2006-03-23 1:06 ` Chris Wright
2006-03-23 4:04 ` Zachary Amsden
2006-03-23 11:42 ` Joshua LeVasseur
2006-03-23 0:31 ` Anthony Liguori
2006-03-23 0:40 ` Chris Wright
2006-03-23 9:25 ` Keir Fraser
2006-03-23 18:50 ` Zachary Amsden [this message]
2006-03-23 23:45 ` [Xen-devel] " Eli Collins
2006-03-23 0:46 ` Zachary Amsden
2006-03-23 0:53 ` Anthony Liguori
2006-03-23 1:01 ` Zachary Amsden
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=4422EE12.7060908@vmware.com \
--to=zach@vmware.com \
--cc=Keir.Fraser@cl.cam.ac.uk \
--cc=anne@vmware.com \
--cc=chrisl@vmware.com \
--cc=chrisw@sous-sol.org \
--cc=jbeulich@novell.com \
--cc=jreddy@vmware.com \
--cc=kmacy@fsmware.com \
--cc=ksrinivasan@novell.com \
--cc=leendert@watson.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=torvalds@osdl.org \
--cc=virtualization@lists.osdl.org \
--cc=wim.coekaerts@oracle.com \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox