From: Len Brown <lenb@kernel.org>
To: Venkatesh Pallipadi <venki@google.com>
Cc: linux-pm@lists.linux-foundation.org,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 7/8] ACPI: acpi_idle: touch TS_POLLING only in the non-MWAIT case
Date: Fri, 28 May 2010 13:59:18 -0400 (EDT) [thread overview]
Message-ID: <alpine.LFD.2.00.1005281351380.4045@localhost.localdomain> (raw)
In-Reply-To: <AANLkTikRUyXMcIkqc3dRCtLPkKBOwOeyy_j1iILHeypj@mail.gmail.com>
On Fri, 28 May 2010, Venkatesh Pallipadi wrote:
> On Thu, May 27, 2010 at 11:02 PM, Len Brown <lenb@kernel.org> wrote:
> > From: Len Brown <len.brown@intel.com>
> >
> > commit d306ebc28649b89877a22158fe0076f06cc46f60
> > (ACPI: Be in TS_POLLING state during mwait based C-state entry)
> > fixed an important power & performance issue where ACPI c2 and c3 C-states
> > were clearing TS_POLLING even when using MWAIT (ACPI_STATE_FFH).
> > That bug had been causing us to receive redundant scheduling interrups
> > when we had already been woken up by MONITOR/MWAIT.
> >
> > Following up on that...
> >
> > In the MWAIT case, we don't have to subsequently
> > check need_resched(), as that c heck was there
> > for the TS_POLLING-clearing case.
> >
> > Note that not only does the cpuidle calling function
> > already check need_resched() before calling us, the
> > low-level entry into monitor/mwait calls it twice --
> > guaranteeing that a write to the trigger address
> > can not go un-noticed.
>
> Ack this part of the change.
>
> > Also, in this case, we don't have to set TS_POLLING
> > when we wake, because we never cleared it.
>
> I thought about this part of the change while working on the original
> patch. But decided to leave the set to be done unconditionally as in
> this case we are replacing "one write" by either "one read and one
> jump" or "one read and one write" and I am not sure we gain much by
> that.
I don't know if the write is more expensive than the read and branch.
In the scheme of things, these things are free and it is the IO
accesses and locks in the idle path that take time.
But when I saw this code fragment incorrectly copied into
the new sfi_idle driver, I decided it was time to change it
to make logical sense to the reader.
thanks,
-Len Brown, Intel Open Source Technology Center
next prev parent reply other threads:[~2010-05-28 17:59 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-05-28 6:01 idle patches for 2.6.35 Len Brown
2010-05-28 6:01 ` [PATCH 1/8] cpuidle: fail to register if !CONFIG_CPU_IDLE Len Brown
2010-05-28 6:01 ` [PATCH 2/8] cpuidle: add cpuidle_unregister_driver() error check Len Brown
2010-05-28 6:01 ` [PATCH 3/8] cpuidle: make cpuidle_curr_driver static Len Brown
2010-05-28 6:01 ` [PATCH 4/8] ACPI: allow a native cpuidle driver to displace ACPI Len Brown
2010-05-28 6:01 ` [PATCH 5/8] sched: clarify commment for TS_POLLING Len Brown
2010-05-28 6:01 ` [PATCH 6/8] acpi_pad: uses MONITOR/MWAIT, so it doesn't need to clear TS_POLLING Len Brown
2010-05-28 6:02 ` [PATCH 7/8] ACPI: acpi_idle: touch TS_POLLING only in the non-MWAIT case Len Brown
2010-05-28 16:19 ` Venkatesh Pallipadi
2010-05-28 17:59 ` Len Brown [this message]
2010-05-28 21:24 ` Venkatesh Pallipadi
2010-05-28 6:02 ` [PATCH 8/8] intel_idle: native hardware cpuidle driver for latest Intel processors Len Brown
-- strict thread matches above, loose matches on Subject: below --
2010-05-27 2:42 idle-test patches queued for upstream Len Brown
2010-05-27 2:42 ` [PATCH 1/8] cpuidle: fail to register if !CONFIG_CPU_IDLE Len Brown
2010-05-27 2:42 ` [PATCH 7/8] ACPI: acpi_idle: touch TS_POLLING only in the non-MWAIT case Len Brown
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=alpine.LFD.2.00.1005281351380.4045@localhost.localdomain \
--to=lenb@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@lists.linux-foundation.org \
--cc=venki@google.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
Powered by JetHome