From patchwork Thu Jan 29 18:26:40 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Rafael J. Wysocki" X-Patchwork-Id: 5744401 Return-Path: X-Original-To: patchwork-linux-pm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id BBB0FBF440 for ; Thu, 29 Jan 2015 18:08:56 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id F33DA2024F for ; Thu, 29 Jan 2015 18:08:54 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id C0FDF201DD for ; Thu, 29 Jan 2015 18:08:53 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755524AbbA2SI0 (ORCPT ); Thu, 29 Jan 2015 13:08:26 -0500 Received: from v094114.home.net.pl ([79.96.170.134]:55354 "HELO v094114.home.net.pl" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S1753961AbbA2SIX (ORCPT ); Thu, 29 Jan 2015 13:08:23 -0500 Received: from aerk16.neoplus.adsl.tpnet.pl (79.191.192.16) (HELO vostro.rjw.lan) by serwer1319399.home.pl (79.96.170.134) with SMTP (IdeaSmtpServer v0.80) id fbfb59d6105bfce4; Thu, 29 Jan 2015 19:08:21 +0100 From: "Rafael J. Wysocki" To: Linux PM list Cc: Linux Kernel Mailing List , ACPI Devel Maling List , Len Brown , Peter Zijlstra Subject: [PATCH 1/5] ACPI / cpuidle: Drop unnecessary calls from ->enter callback routines Date: Thu, 29 Jan 2015 19:26:40 +0100 Message-ID: <5308198.07iHoh2qOo@vostro.rjw.lan> User-Agent: KMail/4.11.5 (Linux/3.16.0-rc5+; KDE/4.11.5; x86_64; ; ) In-Reply-To: <8966777.6Ih8y2AWPy@vostro.rjw.lan> References: <8966777.6Ih8y2AWPy@vostro.rjw.lan> MIME-Version: 1.0 Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Rafael J. Wysocki 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 --- drivers/acpi/processor_idle.c | 8 -------- 1 file changed, 8 deletions(-) -- To unsubscribe from this list: send the line "unsubscribe linux-pm" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html 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; }