From patchwork Mon Jan 9 23:40:39 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Borislav Petkov X-Patchwork-Id: 9506073 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 3E790601EA for ; Mon, 9 Jan 2017 23:40:47 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 26EBD27F81 for ; Mon, 9 Jan 2017 23:40:47 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 17AC027FBE; Mon, 9 Jan 2017 23:40:47 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C1E3C27F81 for ; Mon, 9 Jan 2017 23:40:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756268AbdAIXkp (ORCPT ); Mon, 9 Jan 2017 18:40:45 -0500 Received: from mail.skyhub.de ([78.46.96.112]:42517 "EHLO mail.skyhub.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756210AbdAIXko (ORCPT ); Mon, 9 Jan 2017 18:40:44 -0500 X-Virus-Scanned: Nedap ESD1 at mail.skyhub.de Received: from mail.skyhub.de ([127.0.0.1]) by localhost (door.skyhub.de [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id jeu1HhWoWSWL; Tue, 10 Jan 2017 00:40:41 +0100 (CET) Received: from pd.tnic (p4FC0A08C.dip0.t-ipconnect.de [79.192.160.140]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.skyhub.de (SuperMail on ZX Spectrum 128k) with ESMTPSA id 5C3FF245A8D; Tue, 10 Jan 2017 00:40:41 +0100 (CET) Received: by pd.tnic (Postfix, from userid 1000) id B935F160C99; Tue, 10 Jan 2017 00:40:39 +0100 (CET) Date: Tue, 10 Jan 2017 00:40:39 +0100 From: Borislav Petkov To: "Paul E. McKenney" Cc: "Zheng, Lv" , "Rafael J. Wysocki" , "Wysocki, Rafael J" , "Moore, Robert" , J?rg R?del , lkml , Linux ACPI Subject: Re: 174cc7187e6f ACPICA: Tables: Back port acpi_get_table_with_size() and early_acpi_os_unmap_memory() from Linux kernel Message-ID: <20170109234039.mfefmv5dv4shxnfn@pd.tnic> References: <20170108010158.b62eovaxsbmhfnkb@pd.tnic> <20170108130355.vxhjmj6dlkqw6hyq@pd.tnic> <1AE640813FDE7649BE1B193DEA596E886CE27B7E@SHSMSX101.ccr.corp.intel.com> <1AE640813FDE7649BE1B193DEA596E886CE27BEE@SHSMSX101.ccr.corp.intel.com> <20170109093329.jd7uwlcpci4icpd3@pd.tnic> <20170109221831.GC3800@linux.vnet.ibm.com> <20170109231501.xrhwsv46mznw3kqt@pd.tnic> <20170109233204.GG3800@linux.vnet.ibm.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20170109233204.GG3800@linux.vnet.ibm.com> User-Agent: NeoMutt/20161014 (1.7.1) Sender: linux-acpi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP On Mon, Jan 09, 2017 at 03:32:04PM -0800, Paul E. McKenney wrote: > We could move rcu_scheduler_starting() later, as long as there > is no chance of preemption or context switch before it is invoked. > Would that help in this case, or are we already context switching before > acpi_os_map_cleanup() is invoked? (If we are already context switching, > short-circuiting synchronize_rcu_expedited() would be a bug.) Hmm, how about the below? It would still happen before /* * The boot idle thread must execute schedule() * at least once to get things moving: */ init_idle_bootup_task(current); schedule_preempt_disabled(); in rest_init() and right after native_smp_prepare_cpus() which is where we're splatting. Lemme run it. Even if it works, we would have to stress-test this seriously... diff --git a/init/main.c b/init/main.c index b0c9d6facef9..9be221cc87c3 100644 --- a/init/main.c +++ b/init/main.c @@ -385,7 +385,6 @@ static noinline void __ref rest_init(void) { int pid; - rcu_scheduler_starting(); /* * We need to spawn init first so that it obtains pid 1, however * the init task will end up wanting to create kthreads, which, if @@ -1019,6 +1018,8 @@ static noinline void __init kernel_init_freeable(void) smp_prepare_cpus(setup_max_cpus); + rcu_scheduler_starting(); + workqueue_init(); do_pre_smp_initcalls();