mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Rafael J. Wysocki" <rjw@rjwysocki.net>
To: Linux PM list <linux-pm@vger.kernel.org>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	ACPI Devel Maling List <linux-acpi@vger.kernel.org>,
	Len Brown <len.brown@intel.com>,
	Peter Zijlstra <peterz@infradead.org>
Subject: [PATCH 1/5] ACPI / cpuidle: Drop unnecessary calls from ->enter callback routines
Date: Thu, 29 Jan 2015 19:26:40 +0100	[thread overview]
Message-ID: <5308198.07iHoh2qOo@vostro.rjw.lan> (raw)
In-Reply-To: <8966777.6Ih8y2AWPy@vostro.rjw.lan>

From: Rafael J. Wysocki <rafael.j.wysocki@intel.com>

acpi_idle_enter_simple() and acpi_idle_enter_bm() don't need to
call sched_clock_idle_sleep/wakeup_event(), because that's taken
care of by the core already.  Namely, sched_clock_idle_sleep_event()
is called by tick_nohz_start_idle() called by __tick_nohz_idle_enter()
which in turn is called by tick_nohz_idle_enter() and that is called
by cpu_idle_loop().  Analogously for sched_clock_idle_wakeup_event().

For this reason, drop those calls from the ACPI cpuidle driver's
->enter callback routines.

Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
---
 drivers/acpi/processor_idle.c |    8 --------
 1 file changed, 8 deletions(-)

Index: linux-pm/drivers/acpi/processor_idle.c
===================================================================
--- linux-pm.orig/drivers/acpi/processor_idle.c
+++ linux-pm/drivers/acpi/processor_idle.c
@@ -791,12 +791,8 @@ static int acpi_idle_enter_simple(struct
 	if (cx->type == ACPI_STATE_C3)
 		ACPI_FLUSH_CPU_CACHE();
 
-	/* Tell the scheduler that we are going deep-idle: */
-	sched_clock_idle_sleep_event();
 	acpi_idle_do_entry(cx);
 
-	sched_clock_idle_wakeup_event(0);
-
 	lapic_timer_state_broadcast(pr, cx, 0);
 	return index;
 }
@@ -842,8 +838,6 @@ static int acpi_idle_enter_bm(struct cpu
 
 	acpi_unlazy_tlb(smp_processor_id());
 
-	/* Tell the scheduler that we are going deep-idle: */
-	sched_clock_idle_sleep_event();
 	/*
 	 * Must be done before busmaster disable as we might need to
 	 * access HPET !
@@ -881,8 +875,6 @@ static int acpi_idle_enter_bm(struct cpu
 		raw_spin_unlock(&c3_lock);
 	}
 
-	sched_clock_idle_wakeup_event(0);
-
 	lapic_timer_state_broadcast(pr, cx, 0);
 	return index;
 }


  reply	other threads:[~2015-01-29 18:08 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-29 18:22 [PATCH 0/5] ACPI / cpuidle: More driver cleanups Rafael J. Wysocki
2015-01-29 18:26 ` Rafael J. Wysocki [this message]
2015-01-29 18:27 ` [PATCH 2/5] ACPI / cpuidle: Clean up fallback to C1 checks Rafael J. Wysocki
2015-01-29 18:28 ` [PATCH 3/5] ACPI / cpuidle: Drop irrelevant comment from acpi_idle_enter_simple() Rafael J. Wysocki
2015-01-29 18:29 ` [PATCH 4/5] ACPI / cpuidle: Clean up white space in a switch statement Rafael J. Wysocki
2015-01-29 18:30 ` [PATCH 5/5] ACPI / cpuidle: Drop flags.bm_check tests from acpi_idle_enter_bm() Rafael J. Wysocki

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=5308198.07iHoh2qOo@vostro.rjw.lan \
    --to=rjw@rjwysocki.net \
    --cc=len.brown@intel.com \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=peterz@infradead.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

all inboxes | Powered by JetHome®