Received: by 2002:a25:86ce:0:0:0:0:0 with SMTP id y14csp559322ybm; Wed, 22 May 2019 07:50:56 -0700 (PDT) X-Google-Smtp-Source: APXvYqzuUUyHZIbF0VoFyJmv4bBQbfExfgn9ilZu+ba6r9lFnpM/nUjZEIvRFRiAyh8OPaeeh11A X-Received: by 2002:aa7:99c7:: with SMTP id v7mr96719480pfi.103.1558536656851; Wed, 22 May 2019 07:50:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1558536656; cv=none; d=google.com; s=arc-20160816; b=L/ov4pEkVWaTJtjD7++1VzpkUbJMOvad4ZS5S2V2WDhNWO4frc4/FHLcHKw78LTDBp eGxb8rXuk7b1JHriKAjHQOYE1pJYpASOHLMZIKFJdwlrN6Cl5J0WmozsaoObsQb+LJt4 icYBgRnEP+0bUuTE4V8sjtfwMEI4msypzszvVQIvIRrIjbIqDbI2LxkmzGJPg2UQAC5V gkx3BuJbnF9tmo3tuwV8vYc506Nc4VsIdOVi/QJL8rKHTYYOx5GIB3BV9RP1MrBHMi31 Iy1Bl2QagZhZWbfmxhmdNmu6jQqVnQV4nbe1wmOhDnrY8iW4zBSNd5tL3xA7tBY8a57k +TQw== 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=88Bkxm9ztLilz68byouxZeMuCjfn14K5AGbgcj+vwJg=; b=oCaQP0qkPT5U3n/Kd0VI99ygkeMexAKRCSdE7OmMKW+By+C68epeBml6wmFdeGEiJv 8PYzUaL2e7L3Bd+Am2eYRI+S6SSvWbyysF26zh1RfjOm2MSqAqIXxWf0jHslk3xsy7IK QVmkVfXjevec0wPW7xVQEL07g7ch+TVQxwSb9VTmOe/ZZAfARSyDw1xZHF08IbWHV2b1 0U2V3JoymWLSNQbwwXfXJWkLHka19dSxU3nlAIebijtXcoJA9a5PG7AHI8UYp8aRRrwf FjzR252/ToUqpxnYhDthPwgvVEyimXnpNqWudvlmEHbAa29PnmX50fmvB/8A17oF/MoL 5pUA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=IwuuKdaH; 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 p23si25605003plo.215.2019.05.22.07.50.41; Wed, 22 May 2019 07:50:56 -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=bombadil.20170209 header.b=IwuuKdaH; 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 S1729613AbfEVOt0 (ORCPT + 99 others); Wed, 22 May 2019 10:49:26 -0400 Received: from bombadil.infradead.org ([198.137.202.133]:58494 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729005AbfEVOt0 (ORCPT ); Wed, 22 May 2019 10:49:26 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.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=88Bkxm9ztLilz68byouxZeMuCjfn14K5AGbgcj+vwJg=; b=IwuuKdaHaTgi65AI5e8ASar/W EtitAewX8g1AtFG6RhFIEE5kGDhKgYeuAhtrY568kZbEUxz4GIqYOb45ZElE+NXhx1Sl51Jzp6qHi 6XqCt2CQEudrkLQaC7qQBJGBilKYKlBoh8NfB4QQZYa8F4275qPug/ufzwhyl4jtc1ULhdEr8D4Cn QFT0DyTi3Ssuo5mnJMr8S5mc/ptWsyYMrq+n/NjdVaremhxQIn0JQrbN/B2mC0/V0KjdAycpbOul2 p7KgkabCwQZ3xMukJ4H9QR63+UOf01vMu67Q9sxPD5ynvinQHjL1bZPUJvzkvq7iqPH5ph4IFrbmh JVbPlW3vw==; Received: from [31.161.185.207] (helo=worktop.programming.kicks-ass.net) by bombadil.infradead.org with esmtpsa (Exim 4.90_1 #2 (Red Hat Linux)) id 1hTSYV-0005zq-5e; Wed, 22 May 2019 14:49:23 +0000 Received: by worktop.programming.kicks-ass.net (Postfix, from userid 1000) id 884BF984E0B; Wed, 22 May 2019 16:49:18 +0200 (CEST) Date: Wed, 22 May 2019 16:49:18 +0200 From: Peter Zijlstra To: Andrew Murray Cc: Thomas Gleixner , Rik van Riel , linux-kernel@vger.kernel.org Subject: Re: [PATCH] smp,cpumask: Don't call functions on offline CPUs Message-ID: <20190522144918.GH16275@worktop.programming.kicks-ass.net> References: <20190522111537.27815-1-andrew.murray@arm.com> <20190522140921.GD16275@worktop.programming.kicks-ass.net> <20190522143711.GC8268@e119886-lin.cambridge.arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190522143711.GC8268@e119886-lin.cambridge.arm.com> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, May 22, 2019 at 03:37:11PM +0100, Andrew Murray wrote: > > Is perhaps the problem that on_each_cpu_cond() uses cpu_onlne_mask > > without protection? > > Does this prevent racing with a CPU going offline? I guess this prevents > the warning at the expense of a lock - but is only beneficial in the > unlikely path. (In the likely path this prevents new CPUs going offline > but we don't care because we don't WARN if they aren't they when we > attempt to call functions). > > At least this is my limited understanding. Hmm.. I don't think it could matter, we only use the mask when preempt_disable(), which would already block offline, due to it using stop_machine(). So the patch is a no-op. What's the WARN you see? TLB invalidation should pass mm_cpumask(), which similarly should not contain offline CPUs I'm thinking.