Received: by 2002:a25:f815:0:0:0:0:0 with SMTP id u21csp3181639ybd; Mon, 24 Jun 2019 21:09:02 -0700 (PDT) X-Google-Smtp-Source: APXvYqyYHpAtKkuDOp3tKDqrL5kknZVagGw3YK05EpwG0hRbgsxZi487IldMvvnqLe02tGGNisNt X-Received: by 2002:a63:d218:: with SMTP id a24mr37305004pgg.419.1561435741912; Mon, 24 Jun 2019 21:09:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1561435741; cv=none; d=google.com; s=arc-20160816; b=yRlCGTnas7rrLaXbOEpnbWgIdX20iwMKD9y5QOTm+cQQN06Htcx7JH4v1Vx4Sje0UO s4VBHz120/9rBn28w5fJwCWzlV+/A+kvX1w8aGbvHMJ9hxBBYsEjl41Q4LylZwrVbi0k iXlN0/VdRDmLwYkOpwKD8clc/3BRHjlqBlDlBc1oJtjdjVyOP7rIThi3YVsAoqGna1G5 KwuNdpmpw+MdS5PV6A/BxBPrhQUgrI4e9VHKRNq8Q0FoNz4OGzGLBa+RwesdQjiwJyBm MaPtFESZTfAdxUmOwXlDM9GU/Nk2iCgR6xRjgbYW5U1QPU0EimH3Oxl7saoDiFfmZcwR bgaQ== 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; bh=jd5F7BZ+J4H0qkuBJOpC+1RYCr3MkwG+RVGGYrl1nWM=; b=pmJNqUWEj6hZrVKS2hvh+XVEUUnOBCtAMQbfzQdmyT2Mbnx0DrOuxmFEl/bUm740Y2 Jps6otxUIaEPQycy7b3E+yv9u9KHWrh+x/jhjRUoRzm7/NG91SR/8iFv5U5OuWjeiWVe D2KL2COW4tatwGwYCj/Nih54Bpi52bvyRaVhxp2PJHi/ac2pBAQnInsUJLIsvWB7AaZQ jvh1aGC00riJvbRhPUFsQdnDGx8DzeeS6SFP4H0R0Gc7ooCnkWc/1H0eK/fzuO6Z/34o P0QHkaQxKDbA+qx9rCO2Wt7qCAAHN9aCDDvZxFDJ2u5tuV3FmL9F+lB2hqi7AModnOzx Qn0A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=jOfpsfUQ; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k5si12719661pgm.297.2019.06.24.21.08.46; Mon, 24 Jun 2019 21:09:01 -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=pass header.i=@kernel.org header.s=default header.b=jOfpsfUQ; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729278AbfFYBLV (ORCPT + 99 others); Mon, 24 Jun 2019 21:11:21 -0400 Received: from mail.kernel.org ([198.145.29.99]:34978 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727070AbfFYBLV (ORCPT ); Mon, 24 Jun 2019 21:11:21 -0400 Received: from localhost (lfbn-ncy-1-174-150.w83-194.abo.wanadoo.fr [83.194.254.150]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 5B10920663; Tue, 25 Jun 2019 01:11:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1561425080; bh=sgq+msnAL8kQZ3mY807VJdBo2IAPDJhsech1nzjdf3w=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=jOfpsfUQLiuYRDxN0UFK20JUJKFWFDynl9v4wwhOPj8Dwc8iGiag2xqLwGXByiTmg OKJEJ2L7ZP8u+qI5W4iELQ3uV+vI4HDLJ/1AOhVMqbXjjyEpuhbFbmoP1i59w6GWW3 +Tj2t72OV5mVELADSq+YAK4/hqskTKQP2dBo7vu4= Date: Tue, 25 Jun 2019 03:11:18 +0200 From: Frederic Weisbecker To: Nicholas Piggin Cc: Peter Zijlstra , linux-kernel@vger.kernel.org, Ingo Molnar , Qais Yousef Subject: Re: [PATCH v2] kernel/isolation: Assert that a housekeeping CPU comes up at boot time Message-ID: <20190625011117.GC17497@lerouge> References: <20190625001720.19439-1-npiggin@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190625001720.19439-1-npiggin@gmail.com> User-Agent: Mutt/1.9.4 (2018-02-28) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jun 25, 2019 at 10:17:20AM +1000, Nicholas Piggin wrote: > +static int __init housekeeping_verify_smp(void) > +{ > + int cpu; > + > + if (!housekeeping_flags) > + return 0; > + > + /* > + * Early housekeeping setup is done before CPUs come up, and there are > + * a range of options scattered around that can restrict which CPUs > + * come up. It is possible to pass in a combination of housekeeping > + * and SMP arguments that result in housekeeping assigned to an > + * offline CPU. > + * > + * Check that condition here after SMP comes up, and give a useful > + * error message rather than an obscure non deterministic crash or > + * hang later. > + */ > + for_each_online_cpu(cpu) { > + if (cpumask_test_cpu(cpu, housekeeping_mask)) > + return 0; > + } > + panic("Housekeeping: nohz_full= or isolcpus= resulted in no online CPUs for housekeeping.\n"); Ok let's keep the panic. But let's simplify and spare long iterations off boot load: if (!cpumask_intersects(cpu_online_mask, housekeeping_mask)) panic(...); Thanks.