Received: by 10.192.165.148 with SMTP id m20csp1806624imm; Thu, 3 May 2018 05:50:18 -0700 (PDT) X-Google-Smtp-Source: AB8JxZpWNDZEr5ruSsUEtJhsBOpdayBTs6gHMlSfLqUO4bmFZgPS4hztc7Qy4F3yai8Zz1ce001S X-Received: by 2002:a17:902:6686:: with SMTP id e6-v6mr23888931plk.35.1525351818193; Thu, 03 May 2018 05:50:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1525351818; cv=none; d=google.com; s=arc-20160816; b=R+T7Oc+ZL70Fkl8syHS2Zzoi9qFg8Gd9wroaqF4RjdRoLII2FQSFKekOvp0bOgbyAB ziKy+5wRb+CLxufnMnSsyv7Ki+bokyz+1OsHC6ymQF0MoxRcgd3/nQiVQSiVKeloFuML Wh3Gn2hR137b6Bo+t8Ieo/fTrAzlcP2GpGdsS5I0mZnagczlb60mbFaviVrXFoYbwmMw vABnMSgcnBs24zoacTBI4lo4zgQ3oWx80sp6IHdQgOz7N80kgXT4rYniOqgZR0DGUZUm HeIrkKaQ63Hi0cQ0iYPM/Oai06ckh1Ez33wDShtTfWYGPToDXTIbB8DON+jqqBuMdiyX W7mw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature:arc-authentication-results; bh=lG9YjLYV3kaWixZHxGVq/37tB+aPtDGI9VX3pPBJoCw=; b=eZdzk4x+fQJwt038Ll0hNT25KHjst32RnHRoXUXzT8O7HToiI8yU54+ZqEG1JWw3kO +AV2pt4jVg2OypAoD17BUsC7vpv/+zLpNy7oeQYNAw/r6nFPDwQZwLUCDcHSWZmDfynn iGUqI5tJ8j5YOsP5du/NvcCfXLbq1PBII+KQxiN1Jm/RkgGcGt0nIrly5hmKBdejNT3w 2xvOMaMA6e1cBB4Ek/Xe/nNbrrEzIVa96PsixZlXR9+LvcHaqk/v0RXpcjVxcCViEo6o 8hEOwoCuI5K4VGfGzHxDxo4TQfAxXdKhshwuqSkzYOj/pYYCImJ7bwRBTsgVkkTXi3Jx XpvA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=merlin.20170209 header.b=Np6X2caa; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g67si13956666pfe.4.2018.05.03.05.50.03; Thu, 03 May 2018 05:50:18 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@infradead.org header.s=merlin.20170209 header.b=Np6X2caa; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751803AbeECMtw (ORCPT + 99 others); Thu, 3 May 2018 08:49:52 -0400 Received: from merlin.infradead.org ([205.233.59.134]:41560 "EHLO merlin.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751145AbeECMtv (ORCPT ); Thu, 3 May 2018 08:49:51 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=merlin.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=lG9YjLYV3kaWixZHxGVq/37tB+aPtDGI9VX3pPBJoCw=; b=Np6X2caa1ag8EkrZQOu4FHtFx D1728oT76EYeJrzJm71V7j/9OehFrYV2PTwr1n9MGoWm2DXZKrZNYw2kJfTm6tM8JVIMfoxsXZnpM HFbk0Eo7o0E5SxvtiYJyQG+MSOwoSRyO+3wZvOclrz7EzosctyxIBkLJTiHDQGZDtOTzUYMhdTFDN 14THWv0Iw27kJcElHVIMWTjhYEp0hNQAJwwwvpdCmHGY/H3pwVFPTyLrw1F4WCkWXGGfAWF6Uqt4r pENENabIjkXoGwpBoq16Rha1BqwKSHApzixvxVwC4noFgKwq8R7YqSkW/xL46s+hU9OpQguuwqrME 8TpVwbLiA==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=hirez.programming.kicks-ass.net) by merlin.infradead.org with esmtpsa (Exim 4.90_1 #2 (Red Hat Linux)) id 1fEDg8-0003k9-E0; Thu, 03 May 2018 12:49:44 +0000 Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id 23F302029F873; Thu, 3 May 2018 14:49:43 +0200 (CEST) Date: Thu, 3 May 2018 14:49:43 +0200 From: Peter Zijlstra To: Mike Galbraith Cc: Matt Fleming , Ingo Molnar , linux-kernel@vger.kernel.org, Michal Hocko , Paul McKenney Subject: Re: cpu stopper threads and load balancing leads to deadlock Message-ID: <20180503124943.GB12217@hirez.programming.kicks-ass.net> References: <20180417142119.GA4511@codeblueprint.co.uk> <20180420095005.GH4064@hirez.programming.kicks-ass.net> <20180424133325.GA3179@codeblueprint.co.uk> <1525349542.9956.2.camel@gmx.de> <20180503122808.GZ12217@hirez.programming.kicks-ass.net> <1525351221.9956.4.camel@gmx.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1525351221.9956.4.camel@gmx.de> User-Agent: Mutt/1.9.5 (2018-04-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, May 03, 2018 at 02:40:21PM +0200, Mike Galbraith wrote: > On Thu, 2018-05-03 at 14:28 +0200, Peter Zijlstra wrote: > > > > Hurm.. I don't see how this is 'new'. We moved the wakeup out from under > > stopper lock, but that should not affect the RCU state. > > No, not new, just an additional woes from same spot. Ah, ok. Does somsething like this make it go away? diff --git a/kernel/stop_machine.c b/kernel/stop_machine.c index f89014a2c238..a32518c2ba4a 100644 --- a/kernel/stop_machine.c +++ b/kernel/stop_machine.c @@ -650,8 +650,10 @@ int stop_machine_from_inactive_cpu(cpu_stop_fn_t fn, void *data, /* Schedule work on other CPUs and execute directly for local CPU */ set_state(&msdata, MULTI_STOP_PREPARE); cpu_stop_init_done(&done, num_active_cpus()); - queue_stop_cpus_work(cpu_active_mask, multi_cpu_stop, &msdata, - &done); + + RCU_NONIDLE(queue_stop_cpus_work(cpu_active_mask, multi_cpu_stop, + &msdata, &done)); + ret = multi_cpu_stop(&msdata); /* Busy wait for completion. */