public inbox for linux-acpi@vger.kernel.org
 help / color / mirror / Atom feed
From: Jan Rychter <jan-JAsPCFd0eodBDgjK7y7TUQ@public.gmane.org>
To: acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
Subject: Re: VMware and ACPI
Date: Mon, 22 Sep 2003 12:56:09 -0700	[thread overview]
Message-ID: <m28yoglhra.fsf@tnuctip.rychter.com> (raw)
In-Reply-To: <20030919203214.GA579-I/5MKhXcvmPrBKCeMvbIDA@public.gmane.org> (Pavel Machek's message of "Fri, 19 Sep 2003 22:32:15 +0200")


[-- Attachment #1.1: Type: text/plain, Size: 1210 bytes --]

>>>>> "Pavel" == Pavel Machek <pavel-+ZI9xUNit7I@public.gmane.org> writes:
 >> Hmm... just wondering: what happened to the VMware/ACPI interaction
 >> issues that some people were reporting here?
 >>
 >> There were some discussions and it seemed that ACPI idling the
 >> processor while VMware really wanted to use it was the cuplrit. Any
 >> resulting changes?
 >>
 >> I'm running 2.4.22-pre10 now and my WindowsXP inside VMware runs
 >> horribly slow. It gets considerably better if I leave an USB device
 >> plugged in (which causes ACPI to use C2 only and never go into C3),
 >> but it still isn't full speed.

 Pavel> What about something like

 Pavel> nice -n 19 while1

"something like" this doesn't do the job nearly as well, because:

  1) performance is better than with an otherwise idle machine, but
     not as good as with the C-state handling turned off

  2) it eats more power, keeping the cpu in C1 is not the same as
     keeping it busy

Please, can we have the patch (attached here again, for everyone's
convenience) applied? It doesn't do anything harmful to people that do
not use it, it just gives us the option of actually running VMware on
Linux.

--J.

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1.2: acpi_no_idle.diff --]
[-- Type: text/x-patch, Size: 1322 bytes --]

--- drivers/acpi/processor.c.orig	2003-09-18 20:31:59.000000000 -0700
+++ drivers/acpi/processor.c	2003-09-18 20:48:51.000000000 -0700
@@ -1677,6 +1677,39 @@
 
 
 static int
+acpi_processor_write_power (
+        struct file  *file,
+        const char  *buffer,
+        unsigned long  count,
+        void   *data)
+{
+ struct acpi_processor *pr = (struct acpi_processor *) data;
+ char   state_string[2] = {'\0'};
+	
+ ACPI_FUNCTION_TRACE("acpi_processor_write_power");
+
+ if (!pr || (count > sizeof(state_string) - 1))
+  return_VALUE(-EINVAL);
+ 
+ if (copy_from_user(state_string, buffer, count))
+  return_VALUE(-EFAULT);
+ 
+ state_string[count] = '\0';
+
+ if (state_string[0] == '1') {
+     printk(KERN_INFO PREFIX "enabling acpi idle\n");
+     pm_idle = acpi_processor_idle;
+ } else {
+     printk(KERN_INFO PREFIX "disabling acpi idle\n");
+     pm_idle = pm_idle_save;
+     acpi_processor_power_activate(pr, ACPI_STATE_C1);
+ }
+
+ return_VALUE(count);
+}
+
+
+static int
 acpi_processor_read_performance (
 	char			*page,
 	char			**start,
@@ -1982,6 +2015,7 @@
 			ACPI_PROCESSOR_FILE_POWER));
 	else {
 		entry->read_proc = acpi_processor_read_power;
+		entry->write_proc = acpi_processor_write_power;
 		entry->data = acpi_driver_data(device);
 	}
 

[-- Attachment #2: Type: application/pgp-signature, Size: 188 bytes --]

  parent reply	other threads:[~2003-09-22 19:56 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-09-15 21:51 VMware and ACPI Jan Rychter
     [not found] ` <m2k789sotw.fsf-dTJq59+VGzkkCw8IV3R6h0EOCMrvLtNR@public.gmane.org>
2003-09-16  9:00   ` Frank Mehnert
     [not found]     ` <200309161100.52454.fm3-IG//nw+yl+iQIjdd1DhZXWfrygkm6VTR@public.gmane.org>
2003-09-16 19:42       ` Jan Rychter
2003-09-19 17:51         ` Jan Rychter
2003-09-19 20:32   ` Pavel Machek
     [not found]     ` <20030919203214.GA579-I/5MKhXcvmPrBKCeMvbIDA@public.gmane.org>
2003-09-22 19:56       ` Jan Rychter [this message]
     [not found]         ` <m28yoglhra.fsf-dTJq59+VGzkkCw8IV3R6h0EOCMrvLtNR@public.gmane.org>
2003-09-23  6:05           ` Pavel Machek

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=m28yoglhra.fsf@tnuctip.rychter.com \
    --to=jan-jaspcfd0eodbdgjk7y7tuq@public.gmane.org \
    --cc=acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.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