All of lore.kernel.org
 help / color / mirror / Atom feed
From: "R. Armiento" <reply-2006@armiento.net>
To: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] add 'monitor' and 'mwait' instruction (update)
Date: Sun, 09 Jul 2006 15:20:02 +0200	[thread overview]
Message-ID: <44B10282.3060707@armiento.net> (raw)
In-Reply-To: <1AC114B9-DB82-4F97-B0A8-831233CA2ECE@gmx.de>


> R. Armiento wrote:
>> Couldn't there be situations where someone depends on mwait waking up 
>> without there being an event that wakes hlt? Or are we sure qemu's hlt 
>> will happen to wake up anyway?

Joachim Henke wrote:
> Currently the Linux kernel simply uses monitor/mwait as a faster 'hlt' 
> replacement, so it should be "safe" there. I don't know about other 
> guest OSs. Anyway, I proposed this hack only as a quick "solution" for 
> local usage.

I realize the last version of the patch was just a "quick hack" to solve 
the problem with Linux's idle function. But I just don't see how you can 
postulate that mwait is not used anywhere else in the Linux kernel? 
There are many kernel modules; some being closed source. And if an mwait 
lurks somewhere in your kernel, you might get a really obscure breakage 
that will be a pain to debug...

> Problem is, at the moment I've no idea, how we could achieve this memory 
> monitoring in a safe and simple way in user space. 

I'm trying to read up on monitor and mwait. Apparently mwait puts the 
processor in low-power wait mode, waiting for a memory write in some 
select area defined by monitor; and as I am new to this I'm not sure if 
I have understood all sources from where such a memory write can come 
from while the processor is asleep. One source, I suppose, is from other 
processors in an SMP setup? Another source may be DMA? Does this mean 
that it is safe to emulate wmait as hlt if neiter SMP or DMA is used? 
(Qemu hardware doesn't support DMA, right?)

Rickard

  reply	other threads:[~2006-07-09 11:09 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-07-06 15:13 [Qemu-devel] Pentium D with guest Ubuntu 6.06 server kernel panic with kqemu R. Armiento
2006-07-07  9:06 ` Joachim Henke
2006-07-07  9:39   ` Jens Axboe
2006-07-07 13:39   ` R. Armiento
2006-07-07 12:30 ` [Qemu-devel] [PATCH] add 'monitor' and 'mwait' instruction Joachim Henke
2006-07-07 12:57   ` maestro
2006-07-07 13:22     ` Joachim Henke
2006-07-07 15:21     ` Joachim Henke
2006-07-07 13:18   ` [Qemu-devel] [PATCH] add 'monitor' and 'mwait' instruction (update) Joachim Henke
2006-07-07 13:20   ` Joachim Henke
2006-07-08 13:16     ` R. Armiento
2006-07-08 15:01       ` [Qemu-devel] " Joachim Henke
2006-07-08 20:50         ` R. Armiento
2006-07-09  8:54           ` Joachim Henke
2006-07-09 13:20             ` R. Armiento [this message]
2006-07-09 11:30               ` Paul Brook
2006-07-09 15:25                 ` Jamie Lokier
2006-07-09 13:03               ` [Qemu-devel] 'monitor' and 'mwait' instruction Joachim Henke
2006-07-09 15:21               ` [Qemu-devel] add 'monitor' and 'mwait' instruction (update) Jamie Lokier
2006-07-09 15:11             ` 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=44B10282.3060707@armiento.net \
    --to=reply-2006@armiento.net \
    --cc=qemu-devel@nongnu.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 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.