public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Tony Hoyle <tmh@magenta-netlogic.com>
To: linux-kernel@vger.kernel.org
Subject: ACPI slowdown...
Date: Wed, 07 Feb 2001 17:54:12 +0000	[thread overview]
Message-ID: <3A818BC4.7020007@magenta-netlogic.com> (raw)

I've been trying to track down what makes ACPI kill the system in 2.4.1.

In the acpi_idle function (drivers/acpi/cpu.c), it seems to spend most 
of its time with interrupts disabled, only enabling them to check 
need_resched occasionally.

In the 'sleep1' state the following code is executed:

         for (;;) {
                 unsigned long time;
                 unsigned long diff;

                 __cli();
                 if (current->need_resched)
                         goto out;
                 time = acpi_read_pm_timer();
                 safe_halt();
                 diff = acpi_compare_pm_timers(time, acpi_read_pm_timer());
                 if (diff > acpi_c2_enter_latency
                     && acpi_max_c_state >= 2)
                         goto sleep2;
         }

This looks wrong to me.  It's basically looping with interrupts 
disabled.  I can't see how current->need_resched could be updated at 
all, so the loop will only terminate when the PM timer tells it to.

Isn't disabling interrupts a bad thing anyway?  Wouldn't it be better to 
leave them enabled (this is uniprocessor only so there shouldn't be 
concurrency issues).

Tony

-- 

The only secure computer is one that's unplugged, locked in a safe,
and buried 20 feet under the ground in a secret location... and i'm
not even too sure about that one"--Dennis Huges, FBI.

tmh@magenta-netlogic.com

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

             reply	other threads:[~2001-02-07 17:52 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-02-07 17:54 Tony Hoyle [this message]
2001-02-07 18:20 ` ACPI slowdown Tony Hoyle
2001-02-11 22:04   ` Pavel Machek
  -- strict thread matches above, loose matches on Subject: below --
2001-02-07 19:34 Grover, Andrew
2001-02-08  0:23 ` Tony Hoyle

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=3A818BC4.7020007@magenta-netlogic.com \
    --to=tmh@magenta-netlogic.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